[Interest] Gestures

Rutledge Shawn Shawn.Rutledge at digia.com
Fri Sep 6 17:30:38 CEST 2013


On 6 Sep 2013, at 3:30 PM, Brad Pepers wrote:

> Should it be possible to get gesture events using Qt 5.1.1 on a MacBook Pro and with a QAbstractScrollArea?  I've tried all the combinations I can think of and none seem to work.  The laptop has the nice touch pad where I can do pinching gestures and such but I never get a gesture event in my code.  I've tried enabling gesture events on the QAbstractScrollArea class as well as it's viewport and I've tried to catch them in viewportEvent as well as the normal event handler.  Am I barking up the wrong tree here?

Not yet, because at least Qt Quick's PinchArea and MultiPointTouchArea depend on having touch events.  (PinchArea detects the gesture for itself.)  Whenever we enable touch events then we have trouble getting timely scroll gestures etc. from the OS.  But this patch aims to get native gesture events converted into Qt gestures again:

https://codereview.qt-project.org/#change,64325

But as soon as we start generating native gestures again, we will need to start handling them in Qt Quick, too.  (At least so far I think so.)  So it will take time to get this solution working for all parts of Qt on all OSes where it's possible, but you're welcome to try out that patch in the meantime.




More information about the Interest mailing list