aboutsummaryrefslogtreecommitdiffstats
path: root/examples/declarative/extending/chapter5-listproperties/listproperties.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative/extending/chapter5-listproperties/listproperties.py')
-rw-r--r--examples/declarative/extending/chapter5-listproperties/listproperties.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/declarative/extending/chapter5-listproperties/listproperties.py b/examples/declarative/extending/chapter5-listproperties/listproperties.py
index a6b270b..718691f 100644
--- a/examples/declarative/extending/chapter5-listproperties/listproperties.py
+++ b/examples/declarative/extending/chapter5-listproperties/listproperties.py
@@ -116,7 +116,10 @@ if __name__ == '__main__':
view = QQuickView()
view.setResizeMode(QQuickView.SizeRootObjectToView)
- view.setSource(QUrl.fromLocalFile('app.qml'))
+ qmlFile = os.path.join(os.path.dirname(__file__), 'app.qml')
+ view.setSource(QUrl.fromLocalFile(qmlFile))
+ if view.status() == QQuickView.Error:
+ sys.exit(-1)
view.show()
res = app.exec_()
# Deleting the view before it goes out of scope is required to make sure all child QML instances