MCPcopy Create free account
hub / github.com/PyQt5/PyQt / __init__

Method __init__

Demo/AutoRestart.py:31–44  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

29class Window(QWidget):
30
31 def __init__(self, *args, **kwargs):
32 super(Window, self).__init__(*args, **kwargs)
33 self.resize(400, 400)
34 layout = QHBoxLayout(self)
35
36 self.buttonRestart = QPushButton(
37 "app start...%s...twice\napp pid: %s\n点击按钮重启...\n" %
38 (options.twice, os.getpid()), self)
39 self.buttonRestart.clicked.connect(self.close)
40
41 self.buttonExit = QPushButton('退出', self, clicked=self.doExit)
42
43 layout.addWidget(self.buttonRestart)
44 layout.addWidget(self.buttonExit)
45
46 def doExit(self):
47 global canRestart

Callers

nothing calls this directly

Calls 2

resizeMethod · 0.95
addWidgetMethod · 0.80

Tested by

no test coverage detected