diff --git a/src/declarativeimports/plasmacomponents3/SpinBox.qml b/src/declarativeimports/plasmacomponents3/SpinBox.qml --- a/src/declarativeimports/plasmacomponents3/SpinBox.qml +++ b/src/declarativeimports/plasmacomponents3/SpinBox.qml @@ -36,6 +36,22 @@ readOnly: !control.editable validator: control.validator inputMethodHints: Qt.ImhFormattedNumbersOnly + + // Allow adjusting the value by scrolling over it + MouseArea { + anchors.fill: parent + + // Only handle scroll events + acceptedButtons: Qt.NoButton + cursorShape: Qt.IBeamCursor + onWheel: { + if (wheel.angleDelta.y > 0 && control.value <= control.to) { + control.value = parseInt(control.value, 10) + control.stepSize + } else if (wheel.angleDelta.y < 0 && control.value >= control.from) { + control.value = parseInt(control.value, 10) - control.stepSize + } + } + } } up.indicator: Item {