mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:44:02 +02:00
allow control spinbox with mouse wheel
This commit is contained in:
parent
826d853edf
commit
9bf3759e8d
1 changed files with 10 additions and 22 deletions
|
@ -154,26 +154,14 @@ SpinBox {
|
|||
visible: spinBox.labelInside != ""
|
||||
}
|
||||
|
||||
// MouseArea {
|
||||
// anchors.fill: parent
|
||||
// propagateComposedEvents: true
|
||||
// onWheel: {
|
||||
// if(spinBox.activeFocus)
|
||||
// wheel.accepted = false
|
||||
// else
|
||||
// wheel.accepted = true
|
||||
// }
|
||||
// onPressed: {
|
||||
// mouse.accepted = false
|
||||
// }
|
||||
// onReleased: {
|
||||
// mouse.accepted = false
|
||||
// }
|
||||
// onClicked: {
|
||||
// mouse.accepted = false
|
||||
// }
|
||||
// onDoubleClicked: {
|
||||
// mouse.accepted = false
|
||||
// }
|
||||
// }
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.NoButton
|
||||
onWheel: {
|
||||
if (wheel.angleDelta.y > 0)
|
||||
value += stepSize
|
||||
else
|
||||
value -= stepSize
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue