[Vm-dev] The cooked and the raw [RE: Touch/MultiTouch Events]
ken.dickey at whidbey.com
ken.dickey at whidbey.com
Mon Sep 21 14:02:08 UTC 2020
Greetings,
As I expected, there is someone here before me.
The devil is in the details of course, but the Qt framework allows for
recognized events based on what widget takes the first touch event and
recognized touch patterns (see below). Custom event recognizers can be
added (or bypass to take raw events).
? handlesTouch{,Down,Over} ?
=== from:
https://doc.qt.io/qt-5/gestures-overview.html
==============vvv=============
Overview
QGesture is the central class in Qt's gesture framework, providing a
container for information about gestures performed by the user. QGesture
exposes properties that give general information that is common to all
gestures, and these can be extended to provide additional
gesture-specific information. Common panning, pinching and swiping
gestures are represented by specialized classes: QPanGesture,
QPinchGesture and QSwipeGesture.
Developers can also implement new gestures by subclassing and extending
the QGestureRecognizer class. Adding support for a new gesture involves
implementing code to recognize the gesture from input events. This is
described in the Creating Your Own Gesture Recognizer section.
==============^^^=============
https://doc.qt.io/qt-5/qgesturerecognizer.html
https://doc.qt.io/qt-5/qevent.html
https://doc.qt.io/qt-5/qtouchevent.html
==============vvv=============
Qt will group new touch points together using the following rules:
When the first touch point is detected, the destination widget is
determined firstly by the location on screen and secondly by the
propagation rules.
When additional touch points are detected, Qt first looks to see if
there are any active touch points on any ancestor or descendant of the
widget under the new touch point. If there are, the new touch point is
grouped with the first, and the new touch point will be sent in a single
QTouchEvent to the widget that handled the first touch point
==============^^^=============
FYI,
-KenD
More information about the Vm-dev
mailing list