FlowLayout

This module provides a flow layout for QWidget: FlowLayout.

class FlowLayout(parent=None)[source]

Bases: PyQt5.QtWidgets.QLayout

Layout widgets on (possibly) multiple lines in the available width.

See Qt QLayout for API documentation.

Adapted from C++ Qt FlowLayout example

Parameters

parent (QWidget) – See QLayout

addItem(self, QLayoutItem)[source]
count(self) int[source]
itemAt(self, int) QLayoutItem[source]
takeAt(self, int) QLayoutItem[source]
expandingDirections(self) Qt.Orientations[source]
hasHeightForWidth(self) bool[source]
heightForWidth(self, int) int[source]
setGeometry(self, QRect)[source]
sizeHint(self) QSize[source]
minimumSize(self) QSize[source]
setHorizontalSpacing(spacing)[source]

Set the horizontal spacing between widgets laid out side by side

Parameters

spacing (int) –

horizontalSpacing()[source]

Returns the horizontal spacing between widgets laid out side by side

Return type

int

setVerticalSpacing(spacing)[source]

Set the vertical spacing between lines

Parameters

spacing (int) –

verticalSpacing()[source]

Returns the vertical spacing between lines

Return type

int