299 # make Qt calls that need the E5Application to exist. |
299 # make Qt calls that need the E5Application to exist. |
300 from UI.UserInterface import UserInterface |
300 from UI.UserInterface import UserInterface |
301 |
301 |
302 splash.showMessage( |
302 splash.showMessage( |
303 QCoreApplication.translate("eric6", "Generating Main Window...")) |
303 QCoreApplication.translate("eric6", "Generating Main Window...")) |
304 try: |
304 mainWindow = UserInterface(app, loc, splash, pluginFile, noopen, |
305 mainWindow = UserInterface(app, loc, splash, pluginFile, noopen, |
305 restartArgs) |
306 restartArgs) |
306 app.lastWindowClosed.connect(app.quit) |
307 app.lastWindowClosed.connect(app.quit) |
307 mainWindow.show() |
308 mainWindow.show() |
308 |
309 |
309 QTimer.singleShot(0, uiStartUp) |
310 QTimer.singleShot(0, uiStartUp) |
310 |
311 |
311 # generate a graphical error handler |
312 # generate a graphical error handler |
312 from E5Gui import E5ErrorMessage |
313 from E5Gui import E5ErrorMessage |
313 eMsg = E5ErrorMessage.qtHandler() |
314 eMsg = E5ErrorMessage.qtHandler() |
314 eMsg.setMinimumSize(600, 400) |
315 eMsg.setMinimumSize(600, 400) |
315 |
316 |
316 # start the event loop |
317 # start the event loop |
317 res = app.exec_() |
318 res = app.exec_() |
318 logging.debug("Shutting down, result {0:d}".format(res)) |
319 logging.debug("Shutting down, result {0:d}".format(res)) |
319 logging.shutdown() |
320 logging.shutdown() |
320 sys.exit(res) |
321 sys.exit(res) |
|
322 except Exception as err: |
|
323 raise err |
|
324 |
321 |
325 if __name__ == '__main__': |
322 if __name__ == '__main__': |
326 main() |
323 main() |