FlowLayout

This module provides a flow layout for QWidget: FlowLayout.

class FlowLayout(parent=None)[source]

Bases: PySide2.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
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