PinchEvent QML Type
用于指定捏合事件的相关信息。更多
Import Statement: | import QtQuick |
属性
- accepted : bool
- angle : real
- center : point
- point1 : point
- point2 : point
- pointCount : int
- previousAngle : real
- previousCenter : point
- previousScale : real
- rotation : real
- scale : real
- startCenter : point
- startPoint1 : point
- startPoint2 : point
详细说明
QtQuick 1.1 中添加了 PinchEvent 类型。
center
,startCenter
,previousCenter
属性提供了两个触摸点之间的中心位置。
scale
和previousScale
属性提供缩放因子。
angle
,previousAngle
和rotation
属性提供两点之间的角度和旋转量。
point1
,point2
,startPoint1
,startPoint2
属性提供了触摸点的位置。
如果不处理该手势,可在onPinchStarted
处理程序中将accepted
属性设为 false。
另请参阅 PinchArea 。
属性文档
这些属性用于保存两个触摸点之间的中心点位置。
center
是当前的中心点previousCenter
是上一个事件的中心点startCenter
是手势开始时的中心点
这些属性持有由两个触摸点之间的距离变化决定的比例因子。
scale
是当前的缩放因子。previousScale
是上一个事件的比例因子。
开始捏合手势时,缩放因子为1.0
。
这些属性用于保存两个触摸点之间的角度。
angle
是当前两点间的角度,范围在 -180 到 180 之间。previousAngle
是上一个事件的角度。rotation
是自开始捏合手势以来的总旋转角度。
开始捏合手势时,旋转角度为0.0
。
这些属性提供了产生捏合的实际触摸点。
point1
和 保存点的当前位置。point2
startPoint1
和 保存第二点被触摸时各点的位置。startPoint2
accepted : bool |
如果在PinchArea::onPinchStarted
处理程序中将此属性设置为 false,则不会再生成任何捏合事件,手势也会被忽略。
© 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.