| branch | GCC_SURGE |
| changeset 31 | 5daf16870df6 |
| parent 30 | 5dc02b23752f |
| 27:93b982ccede2 | 31:5daf16870df6 |
|---|---|
1 import Qt 4.7 |
|
2 |
|
3 Rectangle { |
|
4 id: newParent |
|
5 width: 400; height: 400 |
|
6 Item { |
|
7 scale: .5 |
|
8 rotation: 15 |
|
9 x: 10; y: 10 |
|
10 Rectangle { |
|
11 id: myRect |
|
12 objectName: "MyRect" |
|
13 x: 5 |
|
14 width: 100; height: 100 |
|
15 color: "red" |
|
16 } |
|
17 } |
|
18 MouseArea { |
|
19 id: clickable |
|
20 anchors.fill: parent |
|
21 } |
|
22 |
|
23 states: State { |
|
24 name: "reparented" |
|
25 when: clickable.pressed |
|
26 ParentChange { |
|
27 target: myRect |
|
28 parent: newParent |
|
29 } |
|
30 } |
|
31 } |