- Qt 6.8
- Qt Quick
- QML Types
- eventPoint
- Qt 6.8.1 Reference Documentation

# eventPoint QML Type

Qml equivalent for QEventPoint. More...

Import Statement: | `import QtQuick`
In C++: | QEventPoint

- List of all members, including inherited members

## Detailed Description

eventPoint is the Qml value type representation of QEventPoint. It has the same properties as QEventPoint.

The following properties are available:

- bool `eventPoint.accepted`: see also QEventPoint::accepted
- PointerDevice `eventPoint.device`: see also QEventPoint::device
- size `eventPoint.ellipseDiameters`: see also QEventPoint::ellipseDiameters
- point `eventPoint.globalGrabPosition`: see also QEventPoint::globalGrabPosition
- point `eventPoint.globalLastPosition`: see also QEventPoint::globalLastPosition
- point `eventPoint.globalPosition`: see also QEventPoint::globalPosition
- point `eventPoint.globalPressPosition`: see also QEventPoint::globalPressPosition
- bool `eventPoint.grabPosition`: see also QEventPoint::grabPosition
- int `eventPoint.id`: see also QEventPoint::id
- point `eventPoint.lastPosition`: see also QEventPoint::lastPosition
- ulong `eventPoint.lastTimestamp`: see also QEventPoint::lastTimestamp
- point `eventPoint.position`: see also QEventPoint::position
- point `eventPoint.pressPosition`: see also QEventPoint::pressPosition
- int `eventPoint.pressTimestamp`: see also QEventPoint::pressTimestamp
- real `eventPoint.pressure`: see also QEventPoint::pressure
- real `eventPoint.rotation`: see also QEventPoint::rotation
- point `eventPoint.sceneGrabPosition`: see also QEventPoint::sceneGrabPosition
- point `eventPoint.sceneLastPosition`: see also QEventPoint::sceneLastPosition
- point `eventPoint.scenePosition`: see also QEventPoint::scenePosition
- ulong `eventPoint.pressTimestamp`: see also QEventPoint::pressTimestamp
- point `eventPoint.scenePressPosition`: see also QEventPoint::scenePressPosition
- enumeration `eventPoint.state`: see also QEventPoint::state
- real `eventPoint.timeHeld`: see also QEventPoint::timeHeld
- ulong `eventPoint.timestamp`: see also QEventPoint::timestamp
- pointingDeviceUniqueId `eventPoint.uniqueId`: see also QEventPoint::uniqueId
- vector2d `eventPoint.velocity`: see also QEventPoint::velocity

State supports the following values:

Constant | Description
--- | ---
`EventPoint.Unknown` | Unknown state; same as Qt.TouchPointUnknownState
`EventPoint.Stationary` | The event point did not move; same as Qt.TouchPointStationary
`EventPoint.Pressed` | The touch point or button is pressed; same as Qt.TouchPointPressed
`EventPoint.Updated` | The event point was updated; same as Qt.TouchPointMoved
`EventPoint.Released` | The touch point or button was released; same as Qt.TouchPointReleased

The States type is a typedef for QFlags<State>. It stores an OR combination of State values. See also QEventPoint::States

     TapHandler {
         gesturePolicy: TapHandler.ReleaseWithinBounds // exclusive grab on press
         onGrabChanged:
             (transition, eventPoint) => {
                 switch (transition) {
                     case PointerDevice.GrabExclusive:
                         console.log("took exclusive grab of point", eventPoint.id,
                                     "on", eventPoint.device.name)
                         break
                     case PointerDevice.UngrabExclusive:
                         console.log("gave up exclusive grab of point", eventPoint.id,
                                     "on", eventPoint.device.name)
                         break
                     case PointerDevice.CancelGrabExclusive:
                         console.log("exclusive grab of point", eventPoint.id,
                                     "on", eventPoint.device.name, "has been cancelled")
                         break
                 }

                 switch (eventPoint.state) {
                     case EventPoint.Pressed:
                         console.log("on press @", eventPoint.position);
                         break
                     case EventPoint.Updated:
                         console.log("on update @", eventPoint.position);
                         break
                     case EventPoint.Released:
                         console.log("on release @", eventPoint.position);
                         break
                     default:
                         console.log(eventPoint.position, "state", eventPoint.state)
                         break
                 }
             }
     }

See also handlerPoint.