FlowLayout#

This module provides a flow layout for QWidget: FlowLayout.

class FlowLayout(parent=None)[source]#

Bases: 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, a0: QLayoutItem | None)[source]#
count(self) int[source]#
itemAt(self, index: int) QLayoutItem | None[source]#
takeAt(self, index: int) QLayoutItem | None[source]#
expandingDirections(self) Qt.Orientations[source]#
hasHeightForWidth(self) bool[source]#
heightForWidth(self, a0: int) int[source]#
setGeometry(self, a0: 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