blob: 45613b9ba4d1a7d00954676431d833b15082f52b (
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 1.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
}
}
}
|