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

Method __init__

QThread/WakeupThread.py:48–58  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

46class Window(QWidget):
47
48 def __init__(self, *args, **kwargs):
49 super(Window, self).__init__(*args, **kwargs)
50 layout = QVBoxLayout(self)
51 self.progressBar = QProgressBar(self)
52 layout.addWidget(self.progressBar)
53 layout.addWidget(QPushButton('休眠', self, clicked=self.doWait))
54 layout.addWidget(QPushButton('唤醒', self, clicked=self.doWake))
55
56 self.t = Thread(self)
57 self.t.valueChange.connect(self.progressBar.setValue)
58 self.t.start()
59
60 def doWait(self):
61 self.t.pause()

Callers

nothing calls this directly

Calls 4

addWidgetMethod · 0.80
ThreadClass · 0.70
__init__Method · 0.45
startMethod · 0.45

Tested by

no test coverage detected