From 94e475f2b1cbc30993f0d13accf9d4bbb946bee3 Mon Sep 17 00:00:00 2001
From: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Date: Thu, 2 May 2013 10:47:12 +0200
Subject: [PATCH] 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>
---
 src/controls/SpinBox.qml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/controls/SpinBox.qml b/src/controls/SpinBox.qml
index 6f1eebde8..c9736748c 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 {
-- 
GitLab