[Qt-interest] QPanGesture why two points ?

Sean Hayes sean.t.hayes at vanderbilt.edu
Sun Apr 3 01:25:08 CEST 2011


>
> > ev->touchPoints().at(0); and ev->touchPoints().at(1);
> Quick look only, but appears to be start and end, to calculate the offset.
>

No, those are two points from the current touch event. Wathek is correct, it
is setup to be a two finger gesture. I would argue that it is often helpful
to require two fingers to pan so single-fingered events can be used for
other things, such as dragging. However, if you would like a single finger
pan gesture, you could subclass QGesture and QGestureRecognizer.

I believe that the QPanGesture is not describe as a two-fingered gesture
anywhere in the Qt documentation. That is a significant oversight! Also, the
graphic in the class
description<http://doc.qt.nokia.com/latest/qpangesture.html#details>missleadingly
shows a single finger.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110402/bb12ebf5/attachment.html 


More information about the Qt-interest-old mailing list