~ubuntu-branches/ubuntu/saucy/qtdeclarative-opensource-src/saucy

« back to all changes in this revision

Viewing changes to tests/auto/quick/qquickstates/data/parentChange4.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
 
 
3
Rectangle {
 
4
    width: 400; height: 400
 
5
    Rectangle {
 
6
        id: myRect
 
7
        objectName: "MyRect"
 
8
        x: 5; y: 5
 
9
        width: 100; height: 100
 
10
        color: "red"
 
11
    }
 
12
    MouseArea {
 
13
        id: clickable
 
14
        anchors.fill: parent
 
15
    }
 
16
 
 
17
    Item {
 
18
        id: newParent
 
19
        transform: Scale { xScale: .5; yScale: .7}
 
20
    }
 
21
 
 
22
    states: State {
 
23
        name: "reparented"
 
24
        when: clickable.pressed
 
25
        ParentChange {
 
26
            target: myRect
 
27
            parent: newParent
 
28
        }
 
29
    }
 
30
}