Name Description Size Coverage
qquickdragaxis.cpp 1857 -
qquickdragaxis_p.h 2464 -
qquickdraghandler.cpp ! \qmltype DragHandler \nativetype QQuickDragHandler \inherits MultiPointHandler \inqmlmodule QtQuick \ingroup qtquick-input-handlers \brief Handler for dragging. DragHandler is a handler that is used to interactively move an Item. Like other Input Handlers, by default it is fully functional, and manipulates its \l {PointerHandler::target} {target}. \snippet pointerHandlers/dragHandler.qml 0 It has properties to restrict the range of dragging. If it is declared within one Item but is assigned a different \l {PointerHandler::target} {target}, then it handles events within the bounds of the \l {PointerHandler::parent} {parent} Item but manipulates the \c target Item instead: \snippet pointerHandlers/dragHandlerDifferentTarget.qml 0 A third way to use it is to set \l {PointerHandler::target} {target} to \c null and react to property changes in some other way: \snippet pointerHandlers/dragHandlerNullTarget.qml 0 If minimumPointCount and maximumPointCount are set to values larger than 1, the user will need to drag that many fingers in the same direction to start dragging. A multi-finger drag gesture can be detected independently of both a (default) single-finger DragHandler and a PinchHandler on the same Item, and thus can be used to adjust some other feature independently of the usual pinch behavior: for example adjust a tilt transformation, or adjust some other numeric value, if the \c target is set to null. But if the \c target is an Item, \c centroid is the point at which the drag begins and to which the \c target will be moved (subject to constraints). DragHandler can be used together with the \l Drag attached property to implement drag-and-drop. \sa Drag, MouseArea, {Qt Quick Examples - Pointer Handlers} 20358 -
qquickdraghandler_p.h 3404 -
qquickhandlerpoint.cpp ! \qmltype handlerPoint \nativetype QQuickHandlerPoint \inqmlmodule QtQuick \brief An event point. A handler-owned QML representation of a QEventPoint. It's possible to make bindings to properties of a handler's current \l {SinglePointHandler::point}{point} or \l {MultiPointHandler::centroid}{centroid}. For example: \snippet pointerHandlers/dragHandlerNullTarget.qml 0 The point is kept up-to-date when the DragHandler is actively responding to an \l eventPoint; but after the point is released, or when the current point is being handled by a different handler, \c position.x and \c position.y are 0. \note This is practically identical to \l eventPoint; however an eventPoint is a short-lived copy of a long-lived Q_GADGET which is invalidated between gestures and reused for subsequent event deliveries. Continuous bindings to its properties are not possible, and an individual handler cannot rely on it outside the period when that point is part of an active gesture which that handler is handling. handlerPoint is a Q_GADGET that the handler owns. This allows you to make lifetime bindings to its properties. \sa SinglePointHandler::point, MultiPointHandler::centroid 11647 -
qquickhandlerpoint_p.h 3394 -
qquickhoverhandler.cpp ! \qmltype HoverHandler \nativetype QQuickHoverHandler \inherits SinglePointHandler \inqmlmodule QtQuick \ingroup qtquick-input-handlers \brief Handler for mouse and tablet hover. HoverHandler detects a hovering mouse or tablet stylus cursor. A binding to the \l hovered property is the easiest way to react when the cursor enters or leaves the \l {PointerHandler::parent}{parent} Item. The \l {SinglePointHandler::point}{point} property provides more detail, including the cursor position. The \l {PointerDeviceHandler::acceptedDevices}{acceptedDevices}, \l {PointerDeviceHandler::acceptedPointerTypes}{acceptedPointerTypes}, and \l {PointerDeviceHandler::acceptedModifiers}{acceptedModifiers} properties can be used to narrow the behavior to detect hovering of specific kinds of devices or while holding a modifier key. The \l cursorShape property allows changing the cursor whenever \l hovered changes to \c true. \sa MouseArea, PointHandler, {Qt Quick Examples - Pointer Handlers} 13258 -
qquickhoverhandler_p.h 1794 -
qquickmultipointhandler.cpp ! \qmltype MultiPointHandler \since 5.10 \preliminary \nativetype QQuickMultiPointHandler \inherits PointerDeviceHandler \inqmlmodule QtQuick \brief Abstract handler for multi-point Pointer Events. An intermediate class (not registered as a QML type) for any type of handler which requires and acts upon a specific number of multiple touchpoints. 14765 -
qquickmultipointhandler_p.h 2937 -
qquickmultipointhandler_p_p.h 1445 -
qquickpinchhandler.cpp ! \qmltype PinchHandler \nativetype QQuickPinchHandler \inherits MultiPointHandler \inqmlmodule QtQuick \ingroup qtquick-input-handlers \brief Handler for pinch gestures. PinchHandler is a handler that interprets a multi-finger gesture to interactively rotate, zoom, and drag an Item. Like other Input Handlers, by default it is fully functional, and manipulates its \l target, which is the Item within which it is declared. \snippet pointerHandlers/pinchHandlerSimple.qml 0 It has properties to restrict the range of dragging, rotation, and zoom. If it is declared within one Item but is assigned a different \l target, it handles events within the bounds of the outer Item but manipulates the \c target Item instead: \snippet pointerHandlers/pinchHandlerDifferentTarget.qml 0 A third way to use it is to set \l target to \c null and react to property changes in some other way: \snippet pointerHandlers/pinchHandlerNullTarget.qml 0 \image touchpoints-pinchhandler.png {Touch points, target center, and pinch center during a two-finger rotation and scaling} \note The pinch begins when the number of fingers pressed is between \l {MultiPointHandler::minimumPointCount}{minimumPointCount} and \l {MultiPointHandler::maximumPointCount}{maximumPointCount}, inclusive. Until then, PinchHandler tracks the positions of any pressed fingers, but if it's a disallowed number, it does not scale or rotate its \l target, and the \l active property remains \c false. \sa PinchArea, QPointerEvent::pointCount(), QNativeGestureEvent::fingerCount(), {Qt Quick Examples - Pointer Handlers} 31828 -
qquickpinchhandler_p.h 5210 -
qquickpointerdevicehandler.cpp ! \qmltype PointerDeviceHandler \qmlabstract \since 5.10 \preliminary \nativetype QQuickPointerDeviceHandler \inherits PointerHandler \inqmlmodule QtQuick \brief Abstract handler for pointer events with device-specific constraints. An intermediate class (not registered as a QML type) for handlers which allow filtering based on device type, pointer type, or keyboard modifiers. 9759 -
qquickpointerdevicehandler_p.h 2328 -
qquickpointerdevicehandler_p_p.h 1380 -
qquickpointerhandler.cpp ! \qmltype PointerHandler \qmlabstract \since 5.10 \nativetype QQuickPointerHandler \inqmlmodule QtQuick \brief Abstract handler for pointer events. PointerHandler is the base class Input Handler (not registered as a QML type) for events from any kind of pointing device (touch, mouse or graphics tablet). 40522 -
qquickpointerhandler_p.h 5734 -
qquickpointerhandler_p_p.h oldParent 2183 -
qquickpointhandler.cpp ! \qmltype PointHandler \nativetype QQuickPointHandler \inherits SinglePointHandler \inqmlmodule QtQuick \ingroup qtquick-input-handlers \brief Handler for reacting to a single touchpoint. PointHandler can be used to show feedback about a touchpoint or the mouse position, or to otherwise react to pointer events. When a press event occurs, each instance of PointHandler chooses a single point which is not yet "taken" at that moment: if the press occurs within the bounds of the \l {PointerHandler::parent}, and no sibling PointHandler within the same \l {PointerHandler::parent} has yet acquired a passive grab on that point, and if the other constraints such as \l {PointerDeviceHandler::acceptedButtons}{acceptedButtons}, \l {PointerDeviceHandler::acceptedDevices}{acceptedDevices} etc. are satisfied, it's eligible, and the PointHandler then acquires a passive grab. In this way, the \l {PointerHandler::parent} acts like an exclusive group: there can be multiple instances of PointHandler, and the set of pressed touchpoints will be distributed among them. Each PointHandler which has chosen a point to track has its \l active property \c true. It then continues to track its chosen point until release: the properties of the \l point will be kept up-to-date. Any Item can bind to these properties, and thereby follow the point's movements. By being only a passive grabber, it has the ability to keep independent oversight of all movements. The passive grab cannot be stolen or overridden even when other gestures are detected and exclusive grabs occur. If your goal is orthogonal surveillance of eventpoints, an older alternative was QObject::installEventFilter(), but that has never been a built-in QtQuick feature: it requires some C++ code, such as a QQuickItem subclass. PointHandler is more efficient than that, because only pointer events will be delivered to it, during the course of normal event delivery in QQuickWindow; whereas an event filter needs to filter all QEvents of all types, and thus sets itself up as a potential event delivery bottleneck. One possible use case is to add this handler to a transparent Item which is on top of the rest of the scene (by having a high \l{Item::z} {z} value), so that when a point is freshly pressed, it will be delivered to that Item and its handlers first, providing the opportunity to take the passive grab as early as possible. Such an item (like a pane of glass over the whole UI) can be a convenient parent for other Items which visualize the kind of reactive feedback which must always be on top; and likewise it can be the parent for popups, popovers, dialogs and so on. If it will be used in that way, it can be helpful for your main.cpp to use QQmlContext::setContextProperty() to make the "glass pane" accessible by ID to the entire UI, so that other Items and PointHandlers can be reparented to it. \snippet pointerHandlers/pointHandler.qml 0 Like all input handlers, a PointHandler has a \l target property, which may be used as a convenient place to put a point-tracking Item; but PointHandler will not automatically manipulate the \c target item in any way. You need to use bindings to make it react to the \l point. \note On macOS, PointHandler does not react to multiple fingers on the trackpad by default, although it does react to a pressed point (mouse position). That is because macOS can provide either native gesture recognition, or raw touchpoints, but not both. We prefer to use the native gesture event in PinchHandler, so we do not want to disable it by enabling touch. However MultiPointTouchArea does enable touch, thus disabling native gesture recognition within the entire window; so it's an alternative if you only want to react to all the touchpoints but do not require the smooth native-gesture experience. \sa MultiPointTouchArea, HoverHandler, {Qt Quick Examples - Pointer Handlers} 12217 -
qquickpointhandler_p.h 1177 -
qquicksinglepointhandler.cpp ! \qmltype SinglePointHandler \qmlabstract \preliminary \nativetype QQuickSinglePointHandler \inherits PointerDeviceHandler \inqmlmodule QtQuick \brief Abstract handler for single-point Pointer Events. An intermediate class (not registered as a QML type) for the most common handlers: those which expect only a single point. wantsPointerEvent() will choose the first point which is inside the \l target item, and return true as long as the event contains that point. Override handleEventPoint() to implement a single-point handler. 7577 -
qquicksinglepointhandler_p.h 1722 -
qquicksinglepointhandler_p_p.h 1224 -
qquicktaphandler.cpp ! \qmltype TapHandler \nativetype QQuickTapHandler \inherits SinglePointHandler \inqmlmodule QtQuick \ingroup qtquick-input-handlers \brief Handler for taps and clicks. TapHandler is a handler for taps on a touchscreen or clicks on a mouse. Detection of a valid tap gesture depends on \l gesturePolicy. The default value is DragThreshold, which requires the press and release to be close together in both space and time. In this case, TapHandler is able to function using only a passive grab, and therefore does not interfere with event delivery to any other Items or Input Handlers. So the default gesturePolicy is useful when you want to modify behavior of an existing control or Item by adding a TapHandler with bindings and/or JavaScript callbacks. Note that buttons (such as QPushButton) are often implemented not to care whether the press and release occur close together: if you press the button and then change your mind, you need to drag all the way off the edge of the button in order to cancel the click. For this use case, set the \l gesturePolicy to \c TapHandler.ReleaseWithinBounds. \snippet pointerHandlers/tapHandlerButton.qml 0 For multi-tap gestures (double-tap, triple-tap etc.), the distance moved must not exceed QStyleHints::mouseDoubleClickDistance() with mouse and QStyleHints::touchDoubleTapDistance() with touch, and the time between taps must not exceed QStyleHints::mouseDoubleClickInterval(). \sa MouseArea, {Qt Quick Examples - Pointer Handlers} 27084 -
qquicktaphandler_p.h button 4507 -
qquickwheelhandler.cpp ! \qmltype WheelHandler \nativetype QQuickWheelHandler \inherits SinglePointHandler \inqmlmodule QtQuick \ingroup qtquick-input-handlers \brief Handler for the mouse wheel. WheelHandler is a handler that is used to interactively manipulate some numeric property of an Item as the user rotates the mouse wheel. Like other Input Handlers, by default it manipulates its \l {PointerHandler::target} {target}. Declare \l property to control which target property will be manipulated: \snippet pointerHandlers/wheelHandler.qml 0 \l BoundaryRule is quite useful in combination with WheelHandler (as well as with other Input Handlers) to declare the allowed range of values that the target property can have. For example it is possible to implement scrolling using a combination of WheelHandler and \l DragHandler to manipulate the scrollable Item's \l{QQuickItem::y}{y} property when the user rotates the wheel or drags the item on a touchscreen, and \l BoundaryRule to limit the range of motion from the top to the bottom: \snippet pointerHandlers/handlerFlick.qml 0 Alternatively, if \l property is not set or \l target is null, WheelHandler will not automatically manipulate anything; but the \l rotation property can be used in a binding to manipulate another property, or you can implement \c onWheel and handle the wheel event directly. By default, WheelHandler handles \l {QWheelEvent}{wheel events} from a rotating mouse wheel, or virtual "wheel" events from a touchpad. This can be changed by setting \l acceptedDevices. \sa MouseArea, Flickable, {Qt Quick Examples - Pointer Handlers} 24277 -
qquickwheelhandler_p.h 3400 -
qquickwheelhandler_p_p.h 1604 -