Created
March 12, 2013 19:18
-
-
Save anonymous/5146031 to your computer and use it in GitHub Desktop.
qtgui.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
restart_code = 1000 | |
@staticmethod | |
def application_main(): | |
""" | |
The application's main function. | |
Create application and main window and run them. | |
""" | |
while True: | |
app = QApplication(sys.argv) | |
window = GuiMain() | |
window.show() | |
ret = app.exec_() | |
print ret | |
if ret != GuiMain.restart_code: | |
break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I call
QApplication.exit(GuiMain.restart_code)
the application terminates with exit value: 134, and message:QWidget: Must construct a QApplication before a QPaintDevice
I think
QApplication
can't be restarted.