aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/pointerhandlers/qquickdraghandler/data/dragAndWheel.qml
blob: 811326aaba198cca43071f05d9e6bc8c721fd159 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import QtQuick 2.15

Item {
    id: root

    property bool gotWheel: false
    property int changeCount: 0
    property alias wheelHandlerEnabled: wheelHandler.enabled

    width: 640
    height: 480

    Rectangle {
        color: "blue"
        width: 200
        height: 200

        DragHandler {
            id: dragHandler
        }

        WheelHandler {
            id: wheelHandler

            enabled: !dragHandler.active
            onEnabledChanged: root.changeCount++
            onWheel: root.gotWheel = true
        }

    }

}