summaryrefslogtreecommitdiffstats
path: root/examples/declarative/toys/dynamicscene
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative/toys/dynamicscene')
-rw-r--r--examples/declarative/toys/dynamicscene/dynamicscene.qml3
-rw-r--r--examples/declarative/toys/dynamicscene/qml/itemCreation.js7
2 files changed, 4 insertions, 6 deletions
diff --git a/examples/declarative/toys/dynamicscene/dynamicscene.qml b/examples/declarative/toys/dynamicscene/dynamicscene.qml
index cfc4b74..a436b41 100644
--- a/examples/declarative/toys/dynamicscene/dynamicscene.qml
+++ b/examples/declarative/toys/dynamicscene/dynamicscene.qml
@@ -215,9 +215,10 @@ Item {
PropertyChanges { target: stars; opacity: 0 }
}
+ //! [top-level transitions]
transitions: Transition {
PropertyAnimation { duration: 3000 }
ColorAnimation { duration: 3000 }
}
-
+ //! [top-level transitions]
}
diff --git a/examples/declarative/toys/dynamicscene/qml/itemCreation.js b/examples/declarative/toys/dynamicscene/qml/itemCreation.js
index e74f7b0..4ee74c2 100644
--- a/examples/declarative/toys/dynamicscene/qml/itemCreation.js
+++ b/examples/declarative/toys/dynamicscene/qml/itemCreation.js
@@ -28,11 +28,8 @@ function loadComponent() {
function createItem() {
if (itemComponent.status == Component.Ready && draggedItem == null) {
- draggedItem = itemComponent.createObject(window);
- draggedItem.image = paletteItem.image;
- draggedItem.x = posnInWindow.x;
- draggedItem.y = posnInWindow.y;
- draggedItem.z = 3; // make sure created item is above the ground layer
+ draggedItem = itemComponent.createObject(window, {"image": paletteItem.image, "x": posnInWindow.x, "y": posnInWindow.y, "z": 3});
+ // make sure created item is above the ground layer
} else if (itemComponent.status == Component.Error) {
draggedItem = null;
console.log("error creating component");