本页内容

TouchPoint QML Type

描述MultiPointTouchArea 中的一个触点。更多内容...

Import Statement: import QtQuick

属性

详细说明

TouchPoint 类型包含有关触点的信息,例如当前位置、压力和面积。

显示触点及其相关指标(边界框、旋转角度和椭圆直径)的平板电脑

属性文档

ellipseDiameters : size [read-only]

该属性存储了表示触点覆盖区域的椭圆的长轴和短轴。

pointId : int [read-only]

该属性存储了触点(touch point)的点 ID。

MultiPointTouchArea 中的每个触点都将拥有一个唯一的 ID。

pressed : bool [read-only]

该属性表示触摸点当前是否处于按下状态。

pressure : real [read-only]

velocity : vector2d [read-only]

这些属性包含有关触点当前状态的额外信息。

  • pressure 是一个介于 0.0 到 1.0 之间的数值。
  • velocity 是一个向量,其大小以每秒像素为单位。

并非所有触摸设备都支持速度。如果不支持速度,则会报告为 0,0。

previousX : real [read-only]

previousY : real [read-only]

这些属性保存了触点之前的的位置。

rotation : real [read-only]

该属性存储此触点的位置角度。返回值以度为单位,其中零(默认值)表示手指或触控设备朝上,负角度表示向左旋转,正角度表示向右旋转。 大多数触摸屏无法检测旋转,因此零是最常见的值。

另请参阅 QEventPoint::rotation()。

sceneX : real [read-only]

sceneY : real [read-only]

这些属性存储了触点在场景坐标系中的当前位置。

startX : real [read-only]

startY : real [read-only]

这些属性保存了触点的位置。

uniqueId : pointingDeviceUniqueId [read-only]

该属性存储触点或标记的唯一标识符。

该属性通常为空,因为触摸屏无法唯一识别手指。但当该属性被设置时,它应能唯一识别特定的标记物(基准物体)。

要解读该 ID 的内容,需要了解所使用的硬件和驱动程序(例如各种基于 TUIO 的触摸表面)。

x : real [read-only]

y : real [read-only]

这些属性保存了触点当前的位置。

© 2026 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.