EventPoint QML Type
Provides information about an individual point within a PointerEvent. More...
Import Statement: | import QtQuick 2.15 |
Properties
- accepted : bool
- pointId : int
- position : point
- sceneGrabPosition : point
- scenePosition : point
- scenePressPosition : point
- state : int
- timeHeld : real
- velocity : vector2d
Detailed Description
A PointerEvent contains an EventPoint for each point of contact: one corresponding to the mouse cursor, or one for each finger touching a touchscreen.
See also PointerEvent and PointerHandler.
Property Documentation
Indicates whether this point has been accepted during delivery thus far. This flag cannot be usefully set from QML.
This property holds the ID of the point, if any.
Touchpoints have automatically-incrementing IDs: each time the user presses a finger against the touchscreen, it will be a larger number. In other cases, it will be -1.
See also uniqueId.
This property holds the coordinates of the position supplied by the event, relative to the upper-left corner of the Item which has the PointerHandler. If a contact patch is available from the pointing device, this point represents its centroid.
This property holds the scene-relative position at which the EventPoint was located when setGrabber() was called most recently.
This property holds the coordinates of the position supplied by the event, relative to the scene. If a contact patch is available from the device, this point represents its centroid.
This property holds the scene-relative position at which the press event (on a touch device) or most recent change in QQuickPointerEvent::buttons() (on a mouse or tablet stylus) occurred.
This property tells what the user is currently doing at this point.
It can be one of:
Constant | Description |
---|---|
Pressed | The user's finger is now pressing a touchscreen, button or stylus which was not pressed already |
Updated | The touchpoint or position is being moved, with no change in pressed state |
Stationary | The touchpoint or position is not being moved, and there is also no change in pressed state |
Released | The user's finger has now released a touch point, button or stylus which was pressed |
This property holds the amount of time in seconds that the button or touchpoint has been held. It can be used to detect a "long press", and can drive an animation to show progress toward activation of the "long press" action.
[read-only] velocity : vector2d |
This property holds average recent velocity: how fast and in which direction the event point has been moving recently.