~saviq/ubuntu/saucy/qtdeclarative-opensource-src/add-qtquick-delegate-range

« back to all changes in this revision

Viewing changes to tests/auto/quick/qquickmousearea/data/dragging.qml

  • Committer: Package Import Robot
  • Author(s): Timo Jyrinki
  • Date: 2013-02-05 14:17:19 UTC
  • Revision ID: package-import@ubuntu.com-20130205141719-qqeyml8wslpyez52
Tags: upstream-5.0.1
ImportĀ upstreamĀ versionĀ 5.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import QtQuick 2.0
 
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
 }