aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/qtquick1/componentCreation.js
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/snippets/qtquick1/componentCreation.js')
-rw-r--r--doc/src/snippets/qtquick1/componentCreation.js45
1 files changed, 0 insertions, 45 deletions
diff --git a/doc/src/snippets/qtquick1/componentCreation.js b/doc/src/snippets/qtquick1/componentCreation.js
deleted file mode 100644
index 7364139d3d..0000000000
--- a/doc/src/snippets/qtquick1/componentCreation.js
+++ /dev/null
@@ -1,45 +0,0 @@
-//![vars]
-var component;
-var sprite;
-//![vars]
-
-//![func]
-function createSpriteObjects() {
-//![func]
-
-//![remote]
- component = Qt.createComponent("Sprite.qml");
- if (component.status == Component.Ready)
- finishCreation();
- else
- component.statusChanged.connect(finishCreation);
-//![remote]
-
-//![local]
- component = Qt.createComponent("Sprite.qml");
- sprite = component.createObject(appWindow, {"x": 100, "y": 100});
-
- if (sprite == null) {
- // Error Handling
- console.log("Error creating object");
- }
-//![local]
-
-//![func-end]
-}
-//![func-end]
-
-//![finishCreation]
-function finishCreation() {
- if (component.status == Component.Ready) {
- sprite = component.createObject(appWindow, {"x": 100, "y": 100});
- if (sprite == null) {
- // Error Handling
- console.log("Error creating object");
- }
- } else if (component.status == Component.Error) {
- // Error Handling
- console.log("Error loading component:", component.errorString());
- }
-}
-//![finishCreation]