[Qt-interest] QGestureRecognizer Custom Target/Watched Objects

Sean T. Hayes sean.t.hayes at vanderbilt.edu
Tue Apr 26 21:27:23 CEST 2011


Hello,

I am looking for a way to change the way Qt determines the
target/watched QObject passed into the recognize() method. It seems that Qt
assumes that the location of the first touch point is what should receive
the gesture. However, I need a more flexible setup. I may want to have the
target be the widget under the second touch point. Likewise, the widget
located at the centroid of all the touch points could be the desired target.
In this last example the target/watched object may not be located at any of
the touch points. Any ideas on how to setup custom gesture targets?

I know that the QGesture::hotSpot is supposed to help determine the final
target. However, the gesture recognition process is only started if an event
occurs on a QObject that is grabbing the gesture type. As explained earlier,
this may not be the case.

Regards,
Sean
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110426/c81db38d/attachment.html 


More information about the Qt-interest-old mailing list