eventPoint QML Type
相当于QEventPoint 的 Qml。更多
Import Statement: | import QtQuick |
In C++: | QEventPoint |
详细说明
eventPoint 是QEventPoint 的 Qml 值类型表示。它与QEventPoint 具有相同的属性。
可使用以下属性:
- 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. - 枚举
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.
状态支持以下值:
常量 | 描述 |
---|---|
EventPoint.Unknown | 未知状态;与 Qt.TouchPointUnknownState 相同 |
EventPoint.Stationary | 事件点未移动;与 Qt.TouchPointStationary 相同 |
EventPoint.Pressed | 触摸点或按钮被按下;同 Qt.TouchPointPressed |
EventPoint.Updated | 事件点被更新;同 Qt.TouchPointMoved |
EventPoint.Released | 触摸点或按钮被释放;同 Qt.TouchPointReleased |
States 类型是QFlags<State> 的类型定义。它存储状态值的 OR 组合。另请参见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 } } }
另请参见 handlerPoint 。
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.