tests/auto/declarative/qmlvisual/qdeclarativemousearea/drag.qml
branchGCC_SURGE
changeset 31 5daf16870df6
parent 30 5dc02b23752f
equal deleted inserted replaced
27:93b982ccede2 31:5daf16870df6
       
     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 }