def __new__(cls): if cls.__instance is None: cls.__instance = QDockWidget.__new__(cls) return cls.__instance return None