summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@digia.com>2014-07-14 11:11:02 +0200
committerJ-P Nurmi <jpnurmi@digia.com>2014-07-14 12:45:20 +0200
commitc1fc264d578ebbb8db2f97568a561d20c40f94a5 (patch)
tree2c0da763d07d33f305378ed08fd1ba67482ad540
parent0701ca1ee0d03e680e55d5bf4c3a70a99fe8e7b2 (diff)
downloadqtquickcontrols-c1fc264d578ebbb8db2f97568a561d20c40f94a5.tar.gz
SpinBox: don't force active focus when tapping the buttons on touch
This improves the usability of SpinBox on touch devices. The input panel is no longer immediately shown when tapping the buttons, but only when tapping the editor area. Change-Id: I09a2218419490cb33da3b0733c9a42f871edc965 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Liang Qi <liang.qi@digia.com>
-rw-r--r--src/controls/SpinBox.qml4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/controls/SpinBox.qml b/src/controls/SpinBox.qml
index c2712dd8..c06a2099 100644
--- a/src/controls/SpinBox.qml
+++ b/src/controls/SpinBox.qml
@@ -320,7 +320,7 @@ Control {
height: upRect ? upRect.height : 0
onClicked: __increment()
- onPressed: if (activeFocusOnPress) input.forceActiveFocus()
+ onPressed: if (!Settings.hasTouchScreen && activeFocusOnPress) input.forceActiveFocus()
property bool autoincrement: false;
onReleased: autoincrement = false
@@ -336,7 +336,7 @@ Control {
hoverEnabled: true
onClicked: __decrement()
- onPressed: if (activeFocusOnPress) input.forceActiveFocus()
+ onPressed: if (!Settings.hasTouchScreen && activeFocusOnPress) input.forceActiveFocus()
property var downRect: __panel ? __panel.downRect : null