tests/auto/declarative/qdeclarativemousearea/data/dragging.qml
branchGCC_SURGE
changeset 31 5daf16870df6
parent 30 5dc02b23752f
equal deleted inserted replaced
27:93b982ccede2 31:5daf16870df6
       
     1 import Qt 4.7
       
     2 Rectangle {
       
     3     id: whiteRect
       
     4     width: 200
       
     5     height: 200
       
     6     color: "white"
       
     7     Rectangle {
       
     8         id: blackRect
       
     9         objectName: "blackrect"
       
    10         color: "black"
       
    11         y: 50
       
    12         x: 50
       
    13         width: 100
       
    14         height: 100
       
    15         opacity: (whiteRect.width-blackRect.x+whiteRect.height-blackRect.y-199)/200
       
    16         Text { text: blackRect.opacity}
       
    17         MouseArea {
       
    18             objectName: "mouseregion"
       
    19             anchors.fill: parent
       
    20             drag.target: blackRect
       
    21             drag.axis: Drag.XandYAxis
       
    22             drag.minimumX: 0
       
    23             drag.maximumX: whiteRect.width-blackRect.width
       
    24             drag.minimumY: 0
       
    25             drag.maximumY: whiteRect.height-blackRect.height
       
    26          }
       
    27      }
       
    28  }