diff options
author | Liang Qi <liang.qi@digia.com> | 2013-11-13 11:48:15 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-15 19:00:32 +0100 |
commit | 5b38d395a821967b48406faf18f638e252d627fa (patch) | |
tree | 95957b585fdca1d023807d5bbe8ee2498754e70e /src/controls/SpinBox.qml | |
parent | fc710d6a3548f218f853adb2f2cb908398815be6 (diff) | |
download | qtquickcontrols-5b38d395a821967b48406faf18f638e252d627fa.tar.gz |
SpinBox: get active focus when up or down was pressed
This behavior also needs activeFocusOnPress was true.
Task-number: QTBUG-34773
Change-Id: I681c1cb20c1803e3bf7f60af5cdf45ae3fe34dae
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Diffstat (limited to 'src/controls/SpinBox.qml')
-rw-r--r-- | src/controls/SpinBox.qml | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/controls/SpinBox.qml b/src/controls/SpinBox.qml index 0cc2f5a7..bba4eae1 100644 --- a/src/controls/SpinBox.qml +++ b/src/controls/SpinBox.qml @@ -271,6 +271,7 @@ Control { MouseArea { id: mouseUp + objectName: "mouseUp" hoverEnabled: true property var upRect: __panel ? __panel.upRect : null @@ -285,6 +286,7 @@ Control { height: upRect ? upRect.height : 0 onClicked: __increment() + onPressed: if (activeFocusOnPress) input.forceActiveFocus() property bool autoincrement: false; onReleased: autoincrement = false @@ -296,9 +298,12 @@ Control { MouseArea { id: mouseDown + objectName: "mouseDown" hoverEnabled: true onClicked: __decrement() + onPressed: if (activeFocusOnPress) input.forceActiveFocus() + property var downRect: __panel ? __panel.downRect : null anchors.left: parent.left |