DatePicker: support mouse wheel to navigate months

This commit is contained in:
rating89us 2021-06-06 21:04:04 +02:00 committed by rating89us
parent 2946127ed7
commit 39d561d9f2

View file

@ -271,6 +271,11 @@ Item {
MouseArea {
anchors.fill: parent
scrollGestureEnabled: false
onWheel: {
if (wheel.angleDelta.y > 0) return calendar.showPreviousMonth();
if (wheel.angleDelta.y < 0) return calendar.showNextMonth();
}
}
Rectangle {