def startRGBSensorGUI(): app = QApplication(sys.argv) mw = RGBMainWindow() # cw = RGBCenterWidget() rc = app.exec_() del app sys.exit(rc)