Class: QgsOverlayWidgetLayout¶
A custom layout which can be used to overlay child widgets over a parent widget.
Added in version 3.38.
Class Hierarchy¶
Base classes¶
Methods
Adds a widget to the layout, which will be bound to the specified edge. |
|
Returns the spacing between widgets that are laid out side by side. |
|
Sets the spacing between widgets that are laid out side by side. |
|
Sets the spacing between widgets that are laid out on top of each other. |
|
Returns the spacing between widgets that are laid out on top of each other. |
- class qgis.gui.QgsOverlayWidgetLayout[source]¶
Bases:
QLayout
- __init__(parent: QWidget | None = None)
Constructor for QgsOverlayWidgetLayout, with the specified
parent
widget.- Parameters:
parent (Optional[QWidget] = None)
- addWidget(self, widget: QWidget | None, edge: Qt.Edge)[source]¶
Adds a
widget
to the layout, which will be bound to the specifiededge
.Note
Widgets on the left and right edges will always be positioned first, with top and bottom edge widgets expanding to take the remaining horizontal space.
- Parameters:
widget (Optional[QWidget])
edge (Qt.Edge)
- horizontalSpacing(self) int [source]¶
Returns the spacing between widgets that are laid out side by side.
See also
- Return type:
int
- setHorizontalSpacing(self, spacing: int)[source]¶
Sets the spacing between widgets that are laid out side by side.
See also
- Parameters:
spacing (int)
- setVerticalSpacing(self, spacing: int)[source]¶
Sets the spacing between widgets that are laid out on top of each other.
See also
- Parameters:
spacing (int)