728x90 데이터 공유1 [Python] QT Dialog 간 데이터 전달 Parent Dialog 에서 Child Dialog 데이터 읽기 dlg = OptionWindow.OptionWindow() dlg.exec() print("dlg.flag " + str(dlg.flag)) print("dlg.flag2 " + str(dlg.flag2)) Child Dialog - init에서 self.xxxx로 변수 생성 - ok 버튼 클릭 시 변수에 데이터 저장 ==> Parent Dialog에서 위처럼 읽을 수 있음 def __init__(self): super().__init__() # ... 생략 self.flag = 0 self.flag2 = 0 # ... 생략 self.show() def OK_Btn_Clicked(self): # ... 생략 flag1 = self.tab.. 2021. 2. 2. 이전 1 다음 728x90