Browse Source

Merge branch 'master' of github.com:takluyver/pynsist

Thomas Kluyver 8 years ago
parent
commit
23a5941d77
3 changed files with 12 additions and 5 deletions
  1. 6 0
      doc/installers.rst
  2. 5 4
      examples/pyqt5_qml/basicqml/main.py
  3. 1 1
      examples/pyqt5_qml/installer.cfg

+ 6 - 0
doc/installers.rst

@@ -38,6 +38,12 @@ You can override this by setting :func:`sys.excepthook`.
 
 This is only provided if you specify your application using ``entry_point``.
 
+You can also debug an installed application by using the installed Python to
+launch the application. This will show tracebacks in the Command Prompt.
+In the installation directory run::
+
+       C:\\Program Files\\Application>Python\\python.exe "Application.launch.pyw"
+
 Working directory
 -----------------
 

+ 5 - 4
examples/pyqt5_qml/basicqml/main.py

@@ -19,7 +19,8 @@ class JSManager(QtCore.QObject):
         threading.Thread(target=go).start()
 
 
-app = QtGui.QGuiApplication(sys.argv)
-QtQml.qmlRegisterType(JSManager, 'JSManager', 1, 0, 'JSManager')
-engine = QtQml.QQmlApplicationEngine(os.path.join(THIS_DIR, "main.qml"))
-app.exec_()
+def main():
+    app = QtGui.QGuiApplication(sys.argv)
+    QtQml.qmlRegisterType(JSManager, 'JSManager', 1, 0, 'JSManager')
+    engine = QtQml.QQmlApplicationEngine(os.path.join(THIS_DIR, "main.qml"))
+    app.exec_()

+ 1 - 1
examples/pyqt5_qml/installer.cfg

@@ -1,7 +1,7 @@
 [Application]
 name=QML App (PyQt5)
 version=1.0
-entry_point=basicqml:main
+entry_point=basicqml.main:main
 
 [Python]
 version=3.5.2