PDA

View Full Version : extra mouseMoveEvents causing jittering in QGraphicsView



supertwang
11th December 2008, 01:51
Hi everyone.

I'm having a problem with a QGraphicsView instance receiving extra mouseMoveEvent calls that is causing visual jittering when I move a QGraphicsItem contained in the scene.

I have a master QGraphicsView widget, that also acts as a selection manager. It uses the scene's selection list, and implements basic item dragging -- a move on each of the selected QGraphicsItems. Unfortunately amidst all of the 'good' mouseMoveEvents I am receiving 'bad' ones -- strangely -- only when the mouse pointer lies over the original QGraphicsItem's bounding rect. This causes a jittering effect, where the QGraphicsItem being moved bounces between the position it should be in, and the position it was in when the move started (effectively when the item was grabbed by the user's mouse down). Can anyone shed any light on where these extra, disruptive events might be coming from?

Thanks.
Dave

kamre
21st January 2009, 10:14
Hi,
I had rather similar problem and it turned out that all extra mouse events return false for
bool QEvent::spontaneous ()
So after ignoring such events my problem was solved. Probably this can help you.