I am still working on my custom rubber band widget, derived from QWidget. The behavior is as follows:

- on mouse press, the rubberband widget is shown
- on mouse move, the selection area is appended to and displayed on the widget
- on mouse release, the rubberband widget is hidden

The RB widget is created as a child of the widget it interacts with (the "parent widget"). If I implement the RB widget and mouse event handlers directly in the parent widget, everything works fine - the rubberband is displayed, drawn, hidden, and the parent widget receives all signals from the RB.

Following the model in Qwt, I have abstracted this into a "picker" class that now owns the rubberband widget. The picker class is derived from QObject and is created with no parent. The RB widget is created as a child of the parent widget. When the picker is "enabled", it installs an event filter on the parent widget to handle mouse events.

What is happening is this: When the filter is active, every mouse press event is caught by the filter, but after that, only every other set of mouse move events is caught. That is, if you click and drag, the first time you do this, qDebug() shows that the MouseButtonPress event was caught by the filter, but none of the MouseMove events are caught, and no MouseButtonRelease. If you immediately click and drag again, this time, all the events are caught. If you do it a third time, only the mouse press and nothing else. Off, on, off, on for as long as you want to play with it..

I am guessing that some other widget is eating the mouse move events, but the same code is being executed every time.

Can anyone give me some hints to try to determine why this behavior happens, and what I might do to prevent it? Obviously, when the rubberband widget is being shown, it should be getting all of the events.