aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/qml/doc/snippets/qml/componentCreation.js4
-rw-r--r--src/qml/qml/qqmlcomponent.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/doc/snippets/qml/componentCreation.js b/src/qml/doc/snippets/qml/componentCreation.js
index 7364139d3d..ea45f18c37 100644
--- a/src/qml/doc/snippets/qml/componentCreation.js
+++ b/src/qml/doc/snippets/qml/componentCreation.js
@@ -17,7 +17,7 @@ function createSpriteObjects() {
//![local]
component = Qt.createComponent("Sprite.qml");
- sprite = component.createObject(appWindow, {"x": 100, "y": 100});
+ sprite = component.createObject(appWindow, {x: 100, y: 100});
if (sprite == null) {
// Error Handling
@@ -32,7 +32,7 @@ function createSpriteObjects() {
//![finishCreation]
function finishCreation() {
if (component.status == Component.Ready) {
- sprite = component.createObject(appWindow, {"x": 100, "y": 100});
+ sprite = component.createObject(appWindow, {x: 100, y: 100});
if (sprite == null) {
// Error Handling
console.log("Error creating object");
diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp
index 57ea685a5d..a23a322df9 100644
--- a/src/qml/qml/qqmlcomponent.cpp
+++ b/src/qml/qml/qqmlcomponent.cpp
@@ -1207,7 +1207,7 @@ static void QQmlComponent_setQmlParent(QObject *me, QObject *parent)
\js
var component = Qt.createComponent("Button.qml");
if (component.status == Component.Ready)
- component.createObject(parent, {"x": 100, "y": 100});
+ component.createObject(parent, {x: 100, y: 100});
\endjs
Dynamically created instances can be deleted with the \c destroy() method.