aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/handlers
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2021-06-30 23:24:09 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2021-08-05 19:20:41 +0200
commit0fb1a49db192e7b0f0b0fe7ac441dead1608eb63 (patch)
treee9c94e1fd89960552ba0fe2f103874a098485d4b /src/quick/handlers
parentaade6857d12b2c9cd5552d25f4d084a5fcd25f7d (diff)
doc: Add a TapHandler button snippet
It was ironic that it's the most obvious use case of TapHandler but we didn't have some easy copy-and-paste code for making your own button. Pick-to: 6.1 6.2 Change-Id: I680b6f828f0df82e2ab8b434a2e76aabb21fc2b9 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src/quick/handlers')
-rw-r--r--src/quick/handlers/qquicktaphandler.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/quick/handlers/qquicktaphandler.cpp b/src/quick/handlers/qquicktaphandler.cpp
index 74051d8165..f1620f4c41 100644
--- a/src/quick/handlers/qquicktaphandler.cpp
+++ b/src/quick/handlers/qquicktaphandler.cpp
@@ -77,6 +77,8 @@ int QQuickTapHandler::m_touchMultiTapDistanceSquared(-1);
button in order to cancel the click. For this use case, set the
\l gesturePolicy to \c TapHandler.ReleaseWithinBounds.
+ \snippet pointerHandlers/tapHandlerButton.qml 0
+
For multi-tap gestures (double-tap, triple-tap etc.), the distance moved
must not exceed QStyleHints::mouseDoubleClickDistance() with mouse and
QStyleHints::touchDoubleTapDistance() with touch, and the time between