aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickmousearea/data/changeAxis.qml
blob: 4463f467a2365c6a418733b1631a0a17c966633b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import QtQuick 2.0
Rectangle {
    id: whiteRect
    width: 200
    height: 200
    color: "white"
    Rectangle {
        id: blackRect
        objectName: "blackrect"
        color: "black"
        y: 50
        x: 50
        width: 100
        height: 100
        MouseArea {
            objectName: "mouseregion"
            anchors.fill: parent
            drag.target: blackRect
            drag.axis: blackRect.x <= 75 ? Drag.XAndYAxis : Drag.YAxis
         }
     }
 }