Contact Us
Skip to main content

QtWS17 - Pointer Handlers for fluid applications in Qt Quick, Shawn Rutledge, The Qt Company

Over the last few years we have discussed adding a new way in QtQuick to handle events from pointing devices such as touchscreens, mice and graphics tablets. Now it is on track to ship in 5.10. This is an update and demo of the current status. A PointerHandler is a lightweight C++ object which handles pointing device events on behalf of a parent Item, in order to implement a specific gesture. So far we include implementations of TapHandler (which detects taps, clicks and long-presses, from any device, or from a specific device); DragHandler, which drags its parent Item, or an alternate target; and PinchHandler, which handles two or more touch points to scale, rotate and drag its parent Item or alternate target. Other handlers are coming; and in the future, we intend to have public C++ API for implementing your own.