summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlcontext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/qml/qmlcontext.cpp')
-rw-r--r--src/declarative/qml/qmlcontext.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/declarative/qml/qmlcontext.cpp b/src/declarative/qml/qmlcontext.cpp
index 68453c3..cf33610 100644
--- a/src/declarative/qml/qmlcontext.cpp
+++ b/src/declarative/qml/qmlcontext.cpp
@@ -136,7 +136,7 @@ void QmlContextPrivate::addDefaultObject(QObject *object, Priority priority)
QmlContext context(engine.rootContext());
context.setContextProperty("myModel", modelData);
- QmlComponent component("<ListView model=\"{myModel}\" />");
+ QmlComponent component("ListView { model=myModel }");
component.create(&context);
\endcode
@@ -163,7 +163,7 @@ void QmlContextPrivate::addDefaultObject(QObject *object, Priority priority)
QmlContext context(engine.rootContext());
context.addDefaultObject(&myDataSet);
- QmlComponent component("<ListView model=\"{myModel}\" />");
+ QmlComponent component("ListView { model=myModel }");
component.create(&context);
\endcode