aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/handlers/qquicktaphandler.cpp
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2018-02-27 16:11:33 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2018-02-28 11:15:39 +0000
commitc8702adf3140db887ea00f1520ae750fc4492b4c (patch)
treeb259f0cd403e05cf299b66c5b835886922975933 /src/quick/handlers/qquicktaphandler.cpp
parenta9b8541c01e1ea9ed6e136108c4195fe2f00c507 (diff)
TapHandler: document that DragThreshold is the default gesturePolicy
Followup to 6eaa95662c2d4ba287ac5d1de5ec49bd3a9f59e6 Change-Id: I082d0a52588a90f6c066f31e4595a01302e19241 Reviewed-by: Martin Smith <martin.smith@qt.io>
Diffstat (limited to 'src/quick/handlers/qquicktaphandler.cpp')
-rw-r--r--src/quick/handlers/qquicktaphandler.cpp37
1 files changed, 19 insertions, 18 deletions
diff --git a/src/quick/handlers/qquicktaphandler.cpp b/src/quick/handlers/qquicktaphandler.cpp
index 1bfcdc2454..f6c19cf314 100644
--- a/src/quick/handlers/qquicktaphandler.cpp
+++ b/src/quick/handlers/qquicktaphandler.cpp
@@ -232,29 +232,30 @@ void QQuickTapHandler::timerEvent(QTimerEvent *event)
from true to false, regardless of the time held.
\value TapHandler.DragThreshold
- The event point must not move significantly. If the mouse, finger
- or stylus moves past the system-wide drag threshold
- (QStyleHints::startDragDistance), the tap gesture is canceled, even
- if the button or finger is still pressed. This policy can be useful
- whenever TapHandler needs to cooperate with other pointer handlers
- (for example \l DragHandler), because in this case TapHandler will
- never grab.
+ (the default value) The event point must not move significantly.
+ If the mouse, finger or stylus moves past the system-wide drag
+ threshold (QStyleHints::startDragDistance), the tap gesture is
+ canceled, even if the button or finger is still pressed. This policy
+ can be useful whenever TapHandler needs to cooperate with other
+ pointer handlers (for example \l DragHandler) or event-handling Items
+ (for example QtQuick Controls), because in this case TapHandler
+ will not take the exclusive grab, but merely a passive grab.
\value TapHandler.WithinBounds
If the event point leaves the bounds of the \l target item, the tap
- gesture is canceled. The TapHandler will grab on press, but release
- the grab as soon as the boundary constraint is no longer satisfied.
+ gesture is canceled. The TapHandler will take the exclusive grab on
+ press, but will release the grab as soon as the boundary constraint
+ is no longer satisfied.
\value TapHandler.ReleaseWithinBounds
- (the default value) At the time of release (the mouse button is
- released or the finger is lifted), if the event point is outside
- the bounds of the \l target item, a tap gesture is not recognized.
- This is the default value, because it corresponds to typical button
- behavior: you can cancel a click by dragging outside the button,
- and you can also change your mind by dragging back inside the button
- before release. Note that it's necessary for TapHandler to grab on
- press and retain it until release (greedy grab) in order to detect
- this gesture.
+ At the time of release (the mouse button is released or the finger
+ is lifted), if the event point is outside the bounds of the
+ \l target item, a tap gesture is not recognized. This corresponds to
+ typical behavior for button widgets: you can cancel a click by
+ dragging outside the button, and you can also change your mind by
+ dragging back inside the button before release. Note that it's
+ necessary for TapHandler take the exclusive grab on press and retain
+ it until release in order to detect this gesture.
*/
void QQuickTapHandler::setGesturePolicy(QQuickTapHandler::GesturePolicy gesturePolicy)
{