summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@digia.com>2014-09-26 14:46:06 +0200
committerJ-P Nurmi <jpnurmi@digia.com>2014-09-29 09:38:36 +0200
commitebbf3629ae53755c3b5dd0912585a40545f391fc (patch)
tree4cbfed4687f5a936aa513fbbeb1256106bc52546
parentb710049bf8f7a8030b81a0f39d33fd18bc6a65e5 (diff)
downloadqtquickcontrols-ebbf3629ae53755c3b5dd0912585a40545f391fc.tar.gz
Button: trigger menu on touch release
Change-Id: Iee9f0105ef23fcb3ed2db7228f26c93d4491ac44 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
-rw-r--r--src/controls/Button.qml6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/controls/Button.qml b/src/controls/Button.qml
index 74d46bf1..bd862d45 100644
--- a/src/controls/Button.qml
+++ b/src/controls/Button.qml
@@ -109,7 +109,11 @@ BasicButton {
Connections {
target: __behavior
onEffectivePressedChanged: {
- if (__behavior.effectivePressed && menu)
+ if (!Settings.hasTouchScreen && __behavior.effectivePressed && menu)
+ popupMenuTimer.start()
+ }
+ onReleased: {
+ if (Settings.hasTouchScreen && __behavior.containsMouse && menu)
popupMenuTimer.start()
}
}