EventPoint QML Type

Provides information about an individual point within a PointerEvent. More...

Import Statement: import QtQuick 2.15

Properties

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

[read-only] accepted : bool

Indicates whether this point has been accepted during delivery thus far. This flag cannot be usefully set from QML.


[read-only] pointId : int

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.


[read-only] position : point

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.


[read-only] sceneGrabPosition : point

This property holds the scene-relative position at which the EventPoint was located when setGrabber() was called most recently.


[read-only] scenePosition : point

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.


[read-only] scenePressPosition : point

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.


[read-only] state : int

This property tells what the user is currently doing at this point.

It can be one of:

ConstantDescription
PressedThe user's finger is now pressing a touchscreen, button or stylus which was not pressed already
UpdatedThe touchpoint or position is being moved, with no change in pressed state
StationaryThe touchpoint or position is not being moved, and there is also no change in pressed state
ReleasedThe user's finger has now released a touch point, button or stylus which was pressed

[read-only] timeHeld : real

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.