[Qt-interest] QGestureRecognizer and TouchBegin Events

Sean Hayes sean.t.hayes at Vanderbilt.Edu
Mon Nov 29 17:41:23 CET 2010


When a TouchBegin event is received by a widget that is registered to
receive a gesture, the appropriate QGestureRecognizer receives
QTouchEvents. If additional fingers are added or removed to the the
surface, the QTouchEvent's touch points are updated accordingly. Also,
when the use drags his or her fingers off the widget the
QGestureRecognizer continues to receive QTouchEvent. However, the
QTouchEvent's touch-point count is only updated when a finger is
removed from the surface (i.e., now new touch points are added)!

I have a custom gesture that allows the user the change the number of
fingers in the middle performing the gesture. If the user removes a
finger, the gesture recognizer send the correct finger count, but I
cannot figure out how to do the same thing when a user adds a finger
while off the original widget. Does this sound like a Qt design
oversight or bug? Any ideas on how to get this to work would be great.

Thanks for your help,
Sean




More information about the Qt-interest-old mailing list