diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/declarative/dynamic/DynRect.qml | 8 | ||||
-rw-r--r-- | examples/declarative/dynamic/dynamic.qml | 4 |
2 files changed, 10 insertions, 2 deletions
diff --git a/examples/declarative/dynamic/DynRect.qml b/examples/declarative/dynamic/DynRect.qml index 3f83afb..ec27441 100644 --- a/examples/declarative/dynamic/DynRect.qml +++ b/examples/declarative/dynamic/DynRect.qml @@ -1,3 +1,9 @@ import Qt 4.6 -Rect { color: "steelblue"; width: 100; height: 100; id: newRect } +Item { + states: State{ name: "dying"; SetProperties{ target: newRect; opacity: 0 } } + transitions: Transition{ + NumberAnimation{ properties: "opacity"; target: newRect; duration:500 } + } + Rect {color: "steelblue"; width: 100; height: 100; id: newRect } +} diff --git a/examples/declarative/dynamic/dynamic.qml b/examples/declarative/dynamic/dynamic.qml index 286e449..54d8dc8 100644 --- a/examples/declarative/dynamic/dynamic.qml +++ b/examples/declarative/dynamic/dynamic.qml @@ -19,10 +19,12 @@ Rect { id: page; width: 800; height: 800; color:"black" if(a!=null) { a.parent = targetItem2;//BUG: this should happen automatically fourthBox = a; + print(a.toStr()); extendStars = true; } } else { - fourthBox.destroy(); + fourthBox.state = 'dying'; + fourthBox.destroy(500); fourthBox = null; extendStars = false; } |