summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/declarative/dynamic/qml/Sun.qml8
-rw-r--r--examples/declarative/imageprovider/imageprovider.qml2
2 files changed, 5 insertions, 5 deletions
diff --git a/examples/declarative/dynamic/qml/Sun.qml b/examples/declarative/dynamic/qml/Sun.qml
index 796a370..81b6e9b 100644
--- a/examples/declarative/dynamic/qml/Sun.qml
+++ b/examples/declarative/dynamic/qml/Sun.qml
@@ -11,14 +11,14 @@ Image {
//x and y get set when instantiated
//head offscreen
- y: NumberAnimation {
- to: parent.height;
- duration: 10000;
+ NumberAnimation on y {
+ to: window.height / 2;
running: created
+ onRunningChanged: if (running) duration = (window.height - sun.y) * 10; else state = "OffScreen";
}
states: State {
- name: "OffScreen"; when: created && y > window.height / 2;//Below the ground
+ name: "OffScreen";
StateChangeScript { script: { sun.created = false; sun.destroy() } }
}
}
diff --git a/examples/declarative/imageprovider/imageprovider.qml b/examples/declarative/imageprovider/imageprovider.qml
index a1f2794..f899b1e 100644
--- a/examples/declarative/imageprovider/imageprovider.qml
+++ b/examples/declarative/imageprovider/imageprovider.qml
@@ -1,5 +1,5 @@
import Qt 4.6
-import ImageProviderCore 1.0
+import "ImageProviderCore"
//![0]
ListView {
width: 100