MCPcopy Index your code
hub / github.com/PyQt5/PyQt / Worker

Class Worker

QThread/moveToThread.py:21–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19
20
21class Worker(QObject):
22 valueChanged = pyqtSignal(int) # 值变化信号
23
24 def run(self):
25 print('thread id', )
26 for i in range(1, 101):
27 if QThread.currentThread().isInterruptionRequested():
28 break
29 print('value', i)
30 self.valueChanged.emit(i)
31 QThread.sleep(1)
32
33
34class Window(QWidget):

Callers 1

__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected