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

Method __init__

QFlowLayout/Lib/flowlayout.py:55–66  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

53
54class Window(QWidget):
55 def __init__(self):
56 super(Window, self).__init__()
57
58 flowLayout = FlowLayout()
59 flowLayout.addWidget(QPushButton("Short"))
60 flowLayout.addWidget(QPushButton("Longer"))
61 flowLayout.addWidget(QPushButton("Different text"))
62 flowLayout.addWidget(QPushButton("More text"))
63 flowLayout.addWidget(QPushButton("Even longer button text"))
64 self.setLayout(flowLayout)
65
66 self.setWindowTitle("Flow Layout")
67
68
69class FlowLayout(QLayout):

Callers 1

__init__Method · 0.45

Calls 2

FlowLayoutClass · 0.85
addWidgetMethod · 0.80

Tested by

no test coverage detected