def startCameraGUI(): app = QApplication(sys.argv) mw = CameraMainWindow() # cw = CameraCenterWidget() rc = app.exec_() del app sys.exit(rc)