summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets
diff options
context:
space:
mode:
authorChristopher Ham <christopher.ham@nokia.com>2011-01-28 06:03:22 (GMT)
committerChristopher Ham <christopher.ham@nokia.com>2011-01-28 06:03:22 (GMT)
commit74329f77d567e0b7e8cd4cab2ff6ce3f2b8892ad (patch)
tree69780dc6664a9b1f25d4d9fe1b76f66ea05a4adf /doc/src/snippets
parent281f449dfcb533448c0f2df955b4f5c059db7ba2 (diff)
downloadQt-74329f77d567e0b7e8cd4cab2ff6ce3f2b8892ad.zip
Qt-74329f77d567e0b7e8cd4cab2ff6ce3f2b8892ad.tar.gz
Qt-74329f77d567e0b7e8cd4cab2ff6ce3f2b8892ad.tar.bz2
Update Docs, Examples and Demos for new CreateObject overloadable
Dynamic object in Docs explains QScriptValue argument. SameGame and Dynamic scene now make use of overloadable. Task-number: QTBUG-13087 Reviewed-by: Bea Lam
Diffstat (limited to 'doc/src/snippets')
-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]