diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2023-11-14 11:22:08 -0700 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2023-11-17 07:28:57 -0700 |
commit | 8f6809681ec82da783ae8dcd76fa2c209b28fde6 (patch) | |
tree | 326b4c1ac65fc0c083579011f5c729dce9108ac6 /examples/quick | |
parent | 1b166c87d06ef53de9ccc76218dfae7b0359c5e0 (diff) |
Disable TapHandler.longPressed signal if longPressThreshold == 0
There needs to be a way to disable the long-press feature, because it's
exclusive: if we emit longPressed(), we do not emit tapped(). But we
should also be able to accommodate slow users who pause for too long
unintentionally, or while simply observing the behavior.
Also clarify that resetting longPressThreshold reverts to the default.
Add more exhaustive test coverage, verify that longPressed
and tapped are mutually exclusive, and verify the effects of
violating the gesturePolicy.
Change longPressThreshold on LauncherList's back button so that it
always triggers, regardless whether the user pauses on it for a while.
[ChangeLog][QtQuick][Event Handlers] TapHandler.longPressThreshold
can now be set to 0 to disable its press-and-hold feature, and can be
reset to undefined to restore the platform default.
Fixes: QTBUG-119132
Task-number: QTBUG-105810
Pick-to: 6.5 6.6
Change-Id: Id5fd7e51c70fdb0cb6c4beb5615717a222aec871
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'examples/quick')
-rw-r--r-- | examples/quick/shared/LauncherList.qml | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/quick/shared/LauncherList.qml b/examples/quick/shared/LauncherList.qml index 82fcf0c194..876c828469 100644 --- a/examples/quick/shared/LauncherList.qml +++ b/examples/quick/shared/LauncherList.qml @@ -182,6 +182,7 @@ Rectangle { id: tapHandler enabled: root.activePageCount > 0 gesturePolicy: TapHandler.ReleaseWithinBounds + longPressThreshold: 0 onTapped: { pageContainer.children[pageContainer.children.length - 1].exit() } |