Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
In Dragging one DragHandler with one touchpoint we began with a detailed tour through the event delivery logic while one Rectangle is being dragged on a touchscreen with one finger. In qq-ideal-pointer-event-delivery-parallel-drags we looked at delivery of two touchpoints to drag two Rectangles. In Pinch on a touchscreen we looked at delivery of two touchpoints to one Rectangle with a PinchHandler. Now let's look at how a native gesture event from a touchpad can activate the same PinchHandler.
Touchpads generally do not send QTouchEvents with discrete QEventPoints: rather, the operating system does the gesture recognition ahead of time, and the raw touchpoints are not available. Qt delivers a QNativeGestureEvent representing the entire gesture, with only one QEventPoint: the mouse cursor position where the gesture is perceived to occur on the screen. For such events (and also for QWheelEvents and a few other simple ones), so far we use simpler (more ideal) delivery logic: there's no need for distributed gesture recognition, no need for filtering, no synthesis, and little ambiguity about which handler can handle a particular gesture.
TODO diagrams for deliverSinglePointEventUntilAccepted()