qt-interest@trolltech.com
[Top] [All Lists]

Re: Filtering mouse events

Subject: Re: Filtering mouse events
From: Joachim Reichel
Date: Thu, 06 Jan 2005 12:50:46 +0100
Hi,

I've installed a global event filter for qApp to stop all Accel and
AccelOverride events. This works so far.

I've also installed event filters on my instances of subclasses of
QMainWindow and QListView to filter out the mouse events.

You need to install them on all child windows as well. That's what I had to do, at least.

Now, I've installed the filter on the status bar and it works.

But I can't see how to apply this to the QListView. Its children are subclasses of QListViewItem and do not inherit QObject, i.e. you can't install event filters on them.

On the other hand, the event filter installed on QListView does not see most of the mouse events. It sees mouse move events when the mouse enters or leaves the widget, but no button events. What happens with the mouse button events while the mouse is inside the QListView widget?

Regards,
  Joachim

--
List archive and information: http://lists.trolltech.com/qt-interest/

<Prev in Thread] Current Thread [Next in Thread>