diff options
author | Shawn Rutledge <[email protected]> | 2024-05-15 15:00:25 -0700 |
---|---|---|
committer | Shawn Rutledge <[email protected]> | 2024-05-16 15:41:46 -0700 |
commit | 3b3b5a1743733502a9838827b71782274095a729 (patch) | |
tree | 52ec543a3ff4c09abd50ac67bde9a8198e286c49 /tests/manual/quickcontrols | |
parent | 47110feb83b15cb6067c390d7d371baa4fee7f32 (diff) |
Menus manual test: open context menu on mouse press or touch long-press
This enables testing the drag-press-release gesture.
Change-Id: I953fee1f891b2ac907a5a69ca98f720496e7ed91
Reviewed-by: Richard Moe Gustavsen <[email protected]>
Diffstat (limited to 'tests/manual/quickcontrols')
-rw-r--r-- | tests/manual/quickcontrols/menus/Main.qml | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/tests/manual/quickcontrols/menus/Main.qml b/tests/manual/quickcontrols/menus/Main.qml index b5b5517ae1..9047a5f319 100644 --- a/tests/manual/quickcontrols/menus/Main.qml +++ b/tests/manual/quickcontrols/menus/Main.qml @@ -192,9 +192,14 @@ ApplicationWindow { Layout.minimumHeight: 100 TapHandler { - objectName: "textAreaTapHandler" + objectName: "textAreaMouseTapHandler" acceptedButtons: Qt.RightButton - onTapped: editContextMenu.popup() + onPressedChanged: if (pressed) editContextMenu.popup() + } + TapHandler { + objectName: "textAreaTouchTapHandler" + acceptedDevices: PointerDevice.TouchScreen + onLongPressed: editContextMenu.popup() } } @@ -266,9 +271,14 @@ ApplicationWindow { } TapHandler { - objectName: "backgroundTapHandler" + objectName: "backgroundMouseTapHandler" acceptedButtons: Qt.RightButton - onTapped: backgroundContextMenu.popup() + onPressedChanged: if (pressed) backgroundContextMenu.popup() + } + TapHandler { + objectName: "backgroundTouchTapHandler" + acceptedDevices: PointerDevice.TouchScreen + onLongPressed: backgroundContextMenu.popup() } Component { |