반응형 Singleton1 python singleton instance with qwindow 단일 창을 활용하고 싶을 때, 싱클턴 클래스 작성class SingletonInstance: __instance = None @classmethod def get_Instance(self): return self.__instance @classmethod def instance(self): print("instance") if self.__instance ==None: self.__instance = self() else: self.instance = self.get_Instance return self.__instanceclass ChartWindow(QMainWindow, SingletonInstance): def __init__(self): super().__init__() self.setupUi(.. 2018. 6. 6. 이전 1 다음 반응형