4 Blue rect fills (with 10px margin) screen, then red, then green, then screen again.
9 width: 640; height: 480;
14 width: 100; height: 100
21 width: 200; height: 300
28 width: parent.width-10
29 height: parent.height-10
32 //Text { text: "Click me!"; anchors.centerIn: parent }
37 switch(blueRect.state) {
38 case "": blueRect.state = "inRed"; break;
39 case "inRed": blueRect.state = "inGreen"; break;
40 case "inGreen": blueRect.state = ""; break;
48 ParentChange { target: blueRect; parent: redRect; x: 5; y: 5; width: parent.width-10; height: parent.height-10 }
49 PropertyChanges { target: redRect; z: 1 }
53 ParentChange { target: blueRect; parent: greenRect; x: 5; y: 5; width: parent.width-10; height: parent.height-10 }
54 PropertyChanges { target: greenRect; z: 1 }
58 transitions: Transition {
59 ParentAnimation { target: blueRect; //via: whiteRect;
60 NumberAnimation { properties: "x, y, width, height"; duration: 500 }