diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/declarative/imageprovider/main.cpp | 3 | ||||
-rw-r--r-- | examples/declarative/objectlistmodel/main.cpp | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/examples/declarative/imageprovider/main.cpp b/examples/declarative/imageprovider/main.cpp index 9526105..eaaded2 100644 --- a/examples/declarative/imageprovider/main.cpp +++ b/examples/declarative/imageprovider/main.cpp @@ -75,7 +75,6 @@ int main(int argc, char ** argv) QApplication app(argc, argv); QmlView view; - view.setSource(QUrl("qrc:view.qml")); view.engine()->addImageProvider("colors", new ColorImageProvider); @@ -91,7 +90,7 @@ int main(int argc, char ** argv) QmlContext *ctxt = view.rootContext(); ctxt->setContextProperty("myModel", QVariant::fromValue(dataList)); - view.execute(); + view.setSource(QUrl("qrc:view.qml")); view.show(); return app.exec(); diff --git a/examples/declarative/objectlistmodel/main.cpp b/examples/declarative/objectlistmodel/main.cpp index 9e38bea..7ea742b 100644 --- a/examples/declarative/objectlistmodel/main.cpp +++ b/examples/declarative/objectlistmodel/main.cpp @@ -59,7 +59,6 @@ int main(int argc, char ** argv) QApplication app(argc, argv); QmlView view; - view.setSource(QUrl("qrc:view.qml")); QList<QObject*> dataList; dataList.append(new DataObject("Item 1", "red")); @@ -70,7 +69,7 @@ int main(int argc, char ** argv) QmlContext *ctxt = view.rootContext(); ctxt->setContextProperty("myModel", QVariant::fromValue(dataList)); - view.execute(); + view.setSource(QUrl("qrc:view.qml")); view.show(); return app.exec(); |