PySide6.QtWidgets.QTapAndHoldGesture¶
- class QTapAndHoldGesture¶
QTapAndHoldGesture类描述了用户进行的点击并保持(也称为长按)手势。更多…在版本4.6中添加。
概要¶
属性¶
positionᅟ- 点击的位置
方法¶
def
__init__()def
position()def
setPosition()
静态函数¶
def
setTimeout()def
timeout()
注意
本文档可能包含从C++自动翻译到Python的代码片段。我们始终欢迎对代码片段翻译的贡献。如果您发现翻译问题,您也可以通过在我们的https:/bugreports.qt.io/projects/PYSIDE上创建工单来告知我们。
详细描述¶
有关Qt中手势处理的概述以及如何在您的应用程序中使用手势的信息,请参阅Gestures in Widgets and Graphics View文档。
另请参阅
注意
当使用
from __feature__ import true_property时,属性可以直接使用,否则通过访问器函数使用。此属性保存点击的位置。
- Access functions:
- position()¶
- Return type:
另请参阅
属性
positionᅟ的获取器。属性
positionᅟ的设置器。- static setTimeout(msecs)¶
- Parameters:
msecs – 整数
设置手势触发前的超时时间,单位为毫秒。
识别器将检测到触摸按下,如果
msecs后触摸仍然按下,它将触发QTapAndHoldGesture。默认值为700毫秒。另请参阅
- static timeout()¶
- Return type:
整数
获取手势触发前的超时时间,以毫秒为单位。
识别器将检测到触摸按下,如果稍后超时(),触摸仍然按下,它将触发
QTapAndHoldGesture。默认值为700毫秒。另请参阅