def startGUI(): app = QApplication(sys.argv) mw = GUIMainWindow() # cw = GUICenterWidget() rc = app.exec_() del app sys.exit(rc)