QThread (1) 썸네일형 리스트형 6. [Python] QThread , Thread 의 이해 import sys from PyQt5.QtWidgets import QApplication, QWidget, QPushButton, QBoxLayout from PyQt5 import QtCore from PyQt5.QtCore import QObject class Test(QObject): def __init__(self): super().__init__() self.cnt = 0 self.stop_flag = False def start_test(self): while True: self.cnt += 1 print('test1 = ', self.cnt) loop = QtCore.QEventLoop() QtCore.QTimer.singleShot(1000, loop.quit) #1000 ms loop.. 이전 1 다음