aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qmlvisual/qdeclarativemousearea/drag.qml
blob: 99c898e9ff7a5c82825bf7c639ff499dc73a335a (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
import QtQuick 1.0

/*
this test shows a blue box being dragged around -- first roughly tracing the
borders of the window, then doing a rough 'x'-shape, then moving to around the middle.
*/

Rectangle{
    width:400
    height:440
    color: "white"
    Rectangle{
        id: draggable
        width:40; height:40; color: "lightsteelblue"
            y:20
        MouseArea{
            anchors.fill: parent
            drag.target: draggable
            drag.axis: "XandYAxis"
            drag.minimumX: 0
            drag.maximumX: 360
            drag.minimumY: 20
            drag.maximumY: 400
        }
    }
}