File tree Expand file tree Collapse file tree 3 files changed +33
-3
lines changed
Expand file tree Collapse file tree 3 files changed +33
-3
lines changed Original file line number Diff line number Diff line change @@ -33,3 +33,4 @@ The following are QWidget subclasses:
3333| Widget | Description |
3434| ----------- | --------------------- |
3535| [ ` QCollapsible ` ] ( ./qcollapsible.md ) | A collapsible widget to hide and unhide child widgets. |
36+ | [ ` QFlowLayout ` ] ( ./qflowlayout.md ) | A layout that rearranges items based on parent width. |
Original file line number Diff line number Diff line change 1+ # QFlowLayout
2+
3+ QLayout that rearranges items based on parent width.
4+
5+ ``` python
6+ from qtpy.QtWidgets import QApplication, QPushButton, QWidget
7+
8+ from superqt import QFlowLayout
9+
10+ app = QApplication([])
11+
12+ wdg = QWidget()
13+
14+ layout = QFlowLayout(wdg)
15+ layout.addWidget(QPushButton(" Short" ))
16+ layout.addWidget(QPushButton(" Longer" ))
17+ layout.addWidget(QPushButton(" Different text" ))
18+ layout.addWidget(QPushButton(" More text" ))
19+ layout.addWidget(QPushButton(" Even longer button text" ))
20+
21+ wdg.setWindowTitle(" Flow Layout" )
22+ wdg.show()
23+
24+ app.exec()
25+ ```
26+
27+ {{ show_widget(350) }}
28+
29+ {{ show_members('superqt.QFlowLayout') }}
Original file line number Diff line number Diff line change @@ -10,11 +10,11 @@ class QFlowLayout(QLayout):
1010 The widget placement changes depending on the width of the application window.
1111
1212 Code translated from C++ at:
13- https://code.qt.io/cgit/qt/qtbase.git/tree/examples/widgets/layouts/flowlayout?h=6.8
13+ < https://code.qt.io/cgit/qt/qtbase.git/tree/examples/widgets/layouts/flowlayout>
1414
15- described at: https://doc.qt.io/qt-6/qtwidgets-layouts-flowlayout-example.html
15+ described at: < https://doc.qt.io/qt-6/qtwidgets-layouts-flowlayout-example.html>
1616
17- See also: https://doc.qt.io/qt-6/layout.html
17+ See also: < https://doc.qt.io/qt-6/layout.html>
1818
1919 Parameters
2020 ----------
You can’t perform that action at this time.
0 commit comments