aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickmousearea/data/changeAxis.qml
blob: cf791df31d1a4cb7e5393783bc0a86c10d2bd9e3 (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
         }
     }
 }