QTapAndHoldGesture 類描述由用戶做齣的敲擊並保持 (亦稱作 LongTap) 手勢。 更多...
| 頭: |
#include <QTapAndHoldGesture>
|
| CMake: |
find_package(Qt6 REQUIRED COMPONENTS Widgets)
target_link_libraries(mytarget PRIVATE Qt6::Widgets)
|
| qmake: |
QT += widgets
|
| 繼承: | QGesture |
| virtual | ~QTapAndHoldGesture () |
| QPointF | position () const |
| void | setPosition (const QPointF & pos ) |
| void | setTimeout (int msecs ) |
| int | timeout () |
Qt 中手勢處理的概述和在應用程序中使用手勢的有關信息,見 Widget 和圖形視圖中的手勢 文檔。
另請參閱 QPanGesture and QPinchGesture .
此特性保持敲擊的位置
訪問函數:
| QPointF | 位置 () const |
| void | setPosition (const QPointF & pos ) |
[virtual noexcept]
QTapAndHoldGesture::
~QTapAndHoldGesture
()
析構函數。
[static]
void
QTapAndHoldGesture::
setTimeout
(
int
msecs
)
設置超時 (以毫秒為單位),在手勢觸發之前。
識彆器將檢測嚮下觸摸,且若 msecs 後觸摸仍嚮下,它將觸發 QTapAndHoldGesture 。默認值為 700 毫秒。
另請參閱 timeout ().
[static]
int
QTapAndHoldGesture::
timeout
()
獲取超時 (以毫秒為單位),在手勢觸發之前。
識彆器將檢測嚮下觸摸,且若 timeout() 後觸摸仍嚮下,它將觸發 QTapAndHoldGesture 。默認值為 700 毫秒。
另請參閱 setTimeout ().