QGestureEvent Class
The QGestureEvent class provides the description of triggered gestures. More...
| Header: | #include <QGestureEvent> |
| qmake: | QT += widgets |
| Since: | Qt 4.6 |
| Inherits: | QEvent |
This class was introduced in Qt 4.6.
Detailed Description
The QGestureEvent class contains a list of gestures, which can be obtained using the gestures() function.
The gestures are either active or canceled. A list of those that are currently being executed can be obtained using the activeGestures() function. A list of those which were previously active and have been canceled can be accessed using the canceledGestures() function. A gesture might be canceled if the current window loses focus, for example, or because of a timeout, or for other reasons.
If the event handler does not accept the event by calling the generic QEvent::accept() function, all individual QGesture object that were not accepted and in the Qt::GestureStarted state will be propagated up the parent widget chain until a widget accepts them individually, by calling QGestureEvent::accept() for each of them, or an event filter consumes the event.
Further Reading
For an overview of gesture handling in Qt and information on using gestures in your applications, see the Gestures in Widgets and Graphics View document.
See also QGesture, QGestureRecognizer, QWidget::grabGesture(), and QGraphicsObject::grabGesture().