Permalink
Browse files

Don't launch the UI when QML fails to load.

  • Loading branch information...
1 parent efde207 commit 5e5afe64e1cf09e57de7647231f2a83191c5d06d @mgedmin committed Oct 12, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 quicktest.py
View
6 quicktest.py
@@ -7,8 +7,12 @@
app = QtGui.QApplication(sys.argv)
view = QtDeclarative.QDeclarativeView(qml_file)
+
view.showFullScreen()
if __name__ == '__main__':
signal.signal(signal.SIGINT, signal.SIG_DFL) # otherwise PySide ignores ^C
- app.exec_()
+ if view.status == view.Ready:
+ app.exec_()
+ else:
+ print "Could not load %s, exitting" % qml_file

0 comments on commit 5e5afe6

Please sign in to comment.