MCPcopy
hub / github.com/PyQt5/PyQt / __init__

Method __init__

QWidget/WidgetStyle.py:28–36  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

26class Window(QWidget):
27
28 def __init__(self, *args, **kwargs):
29 super(Window, self).__init__(*args, **kwargs)
30 layout = QHBoxLayout(self)
31 layout.addWidget(CustomPaintWidget(self))
32 layout.addWidget(CustomWidget(self))
33 # 注意
34 wc = CustomWidget(self)
35 wc.setAttribute(Qt.WA_StyledBackground) # 很重要
36 layout.addWidget(wc)
37
38
39if __name__ == "__main__":

Callers

nothing calls this directly

Calls 3

CustomPaintWidgetClass · 0.90
CustomWidgetClass · 0.90
addWidgetMethod · 0.80

Tested by

no test coverage detected