QPanGesture Class
QPanGesture 类描述用户做出的平移手势。更多
头文件: | #include <QPanGesture> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Widgets) target_link_libraries(mytarget PRIVATE Qt6::Widgets) |
qmake: | QT += widgets |
继承: | QGesture |
属性
- acceleration : qreal
- delta : const QPointF
- lastOffset : QPointF
- offset : QPointF
公共功能
virtual | ~QPanGesture() |
qreal | acceleration() const |
QPointF | delta() const |
QPointF | lastOffset() const |
QPointF | offset() const |
void | setAcceleration(qreal value) |
void | setLastOffset(const QPointF &value) |
void | setOffset(const QPointF &value) |
另请参阅 QPinchGesture 和QSwipeGesture 。
属性文档
acceleration : qreal
该属性用于保存该手势中触控点的运动加速度
访问功能:
qreal | acceleration() const |
void | setAcceleration(qreal value) |
[read-only]
delta : const QPointF
该属性保存从上一个输入位置到当前输入位置的偏移量。
这与offset() 和lastOffset() 之间的差异基本相同。
访问函数:
QPointF | delta() const |
lastOffset : QPointF
该属性记录了该手势的最后偏移量。
最后偏移量包含在offset 属性中报告的用户输入位置的变化,当此手势有上一个手势事件时。
如果之前没有发生过与此手势相关的事件(即此手势对象包含手势中第一个动作的信息),则此属性的大小为零。
访问函数:
QPointF | lastOffset() const |
void | setLastOffset(const QPointF &value) |
offset : QPointF
该属性表示从第一个输入位置到当前输入位置的总偏移量。
偏移量用于测量输入设备上的手势所覆盖的用户输入位置的总变化。
访问函数:
QPointF | offset() const |
void | setOffset(const QPointF &value) |
© 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.