def launch(): '''Starts the main application loop, parses any user config and commandline args.''' # start main application # for debugging force widgetcount #app = QtWidgets.QApplication(sys.argv+['-widgetcount']) app = QtWidgets.QApplication(sys.argv) # parse commandline arguments try: # PyQt4 Commands.parse(app.argv()) except AttributeError: # PyQt5 Commands.parse(app.arguments()) #print Commands # start a mainwindow widget instance widget = MainCanvas() # start splash # only raise in GUI mode, don't raise in cmdline mode. if not Commands.noGUI(): if not Commands.noSplash(): spl = Splash(PLOGO_PATH) def closeraise(): spl.finish(widget) widget.show() widget.raise_() spl.terms_accepted.connect(closeraise) spl.show() spl.raise_() app.processEvents() # allow gui to update else: dummy = QtWidgets.QSplashScreen() dummy.show() dummy.finish(widget) widget.show() widget.raise_() sys.exit(app.exec_())
def update(): app = QtWidgets.QApplication(sys.argv) win = UpdateWindow() sys.exit(app.exec_())