summaryrefslogtreecommitdiff
path: root/src/controls/SpinBox.qml
diff options
context:
space:
mode:
authorJens Bache-Wiig <jens.bache-wiig@digia.com>2013-05-02 10:47:12 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-05-03 16:52:15 +0200
commit94e475f2b1cbc30993f0d13accf9d4bbb946bee3 (patch)
tree5086f5d94025ed2cd0d88ebb7feccf02a01a683a /src/controls/SpinBox.qml
parente1d5a982d2bbcf89d145c7ab87d43763d3460c53 (diff)
downloadqtquickcontrols-94e475f2b1cbc30993f0d13accf9d4bbb946bee3.tar.gz
Add basic mouse wheel support to SpinBox
Change-Id: I9305a96d981f19ae85104facf2da01b2b215f316 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Diffstat (limited to 'src/controls/SpinBox.qml')
-rw-r--r--src/controls/SpinBox.qml6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/controls/SpinBox.qml b/src/controls/SpinBox.qml
index 6f1eebde..c9736748 100644
--- a/src/controls/SpinBox.qml
+++ b/src/controls/SpinBox.qml
@@ -192,6 +192,12 @@ Control {
anchors.fill: parent
hoverEnabled: true
onPressed: if (activeFocusOnPress) input.forceActiveFocus()
+ onWheel: {
+ if (wheel.angleDelta.y > 0)
+ __increment();
+ else
+ __decrement();
+ }
}
TextInput {