In questa pagina

QTapAndHoldGesture Class

La classe QTapAndHoldGesture descrive un gesto di tocco prolungato (noto anche come LongTap) eseguito dall'utente. Per saperne di più...

Intestazione: #include <QTapAndHoldGesture>
CMake: find_package(Qt6 REQUIRED COMPONENTS Widgets)
target_link_libraries(mytarget PRIVATE Qt6::Widgets)
qmake: QT += widgets
Eredita da: QGesture

Proprietà

Funzioni pubbliche

virtual ~QTapAndHoldGesture()
QPointF position() const
void setPosition(const QPointF &pos)

Membri pubblici statici

void setTimeout(int msecs)
int timeout()

Descrizione dettagliata

Per una panoramica sulla gestione dei gesti in Qt e per informazioni sull'utilizzo dei gesti nelle applicazioni, consultare il documento Gesture nei widget e nella vista grafica.

Vedi anche QPanGesture e QPinchGesture.

Documentazione sulle proprietà

position : QPointF

Questa proprietà indica la posizione del rubinetto

Funzioni di accesso:

QPointF position() const
void setPosition(const QPointF &pos)

Documentazione sulle funzioni membro

[virtual noexcept] QTapAndHoldGesture::~QTapAndHoldGesture()

Distruttore.

[static] void QTapAndHoldGesture::setTimeout(int msecs)

Imposta il timeout, in millisecondi, prima che il gesto venga attivato.

Il riconoscitore rileverà un tocco e, se msecs dopo il tocco è ancora attivo, attiverà l'QTapAndHoldGesture. Il valore predefinito è 700 millisecondi.

Vedi anche timeout().

[static] int QTapAndHoldGesture::timeout()

Restituisce il timeout, espresso in millisecondi, prima che il gesto venga attivato.

Il riconoscitore rileverà un tocco e, se allo scadere del timeout() il tocco è ancora attivo, attiverà l'QTapAndHoldGesture. Il valore predefinito è 700 millisecondi.

Vedi anche setTimeout().

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