equal
deleted
inserted
replaced
|
1 import Qt 4.7 |
|
2 |
|
3 /* |
|
4 this test shows a blue box being dragged around -- first roughly tracing the |
|
5 borders of the window, then doing a rough 'x'-shape, then moving to around the middle. |
|
6 */ |
|
7 |
|
8 Rectangle{ |
|
9 width:400 |
|
10 height:440 |
|
11 color: "white" |
|
12 Rectangle{ |
|
13 id: draggable |
|
14 width:40; height:40; color: "lightsteelblue" |
|
15 y:20 |
|
16 MouseArea{ |
|
17 anchors.fill: parent |
|
18 drag.target: draggable |
|
19 drag.axis: "XandYAxis" |
|
20 drag.minimumX: 0 |
|
21 drag.maximumX: 360 |
|
22 drag.minimumY: 20 |
|
23 drag.maximumY: 400 |
|
24 } |
|
25 } |
|
26 } |