summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/declarative/componentCreation.js
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/snippets/declarative/componentCreation.js')
-rw-r--r--doc/src/snippets/declarative/componentCreation.js6
1 files changed, 1 insertions, 5 deletions
diff --git a/doc/src/snippets/declarative/componentCreation.js b/doc/src/snippets/declarative/componentCreation.js
index c29a1f9..cf59777 100644
--- a/doc/src/snippets/declarative/componentCreation.js
+++ b/doc/src/snippets/declarative/componentCreation.js
@@ -17,15 +17,11 @@ function createSpriteObjects() {
//![local]
component = Qt.createComponent("Sprite.qml");
- sprite = component.createObject(appWindow);
+ sprite = component.createObject(appWindow, {"x": 100, "y": 100});
if (sprite == null) {
// Error Handling
console.log("Error creating object");
- } else {
- sprite.x = 100;
- sprite.y = 100;
- // ...
}
//![local]