Class: QgsOverlayWidgetLayout

class qgis.gui.QgsOverlayWidgetLayout

Bases: PyQt5.QtWidgets.QLayout

A custom layout which can be used to overlay child widgets over a parent widget.

New in version 3.38.

QgsOverlayWidgetLayout(parent: QWidget = None) Constructor for QgsOverlayWidgetLayout, with the specified parent widget.

Methods

addChildLayout

addChildWidget

addItem

param item:

addWidget

Adds a widget to the layout, which will be bound to the specified edge.

alignmentRect

childEvent

connectNotify

count

rtype:

int

customEvent

disconnectNotify

horizontalSpacing

Returns the spacing between widgets that are laid out side by side.

isSignalConnected

itemAt

param index:

minimumSize

rtype:

QSize

receivers

sender

senderSignalIndex

setGeometry

param rect:

setHorizontalSpacing

Sets the spacing between widgets that are laid out side by side.

setVerticalSpacing

Sets the spacing between widgets that are laid out on top of each other.

sizeHint

rtype:

QSize

takeAt

param index:

timerEvent

verticalSpacing

Returns the spacing between widgets that are laid out on top of each other.

widgetEvent

addChildLayout(self, QLayout)
addChildWidget(self, QWidget)
addItem(self, item: QLayoutItem)
Parameters:

item (QLayoutItem) –

addWidget(self, widget: QWidget, edge: Qt.Edge)

Adds a widget to the layout, which will be bound to the specified edge.

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 (QWidget) –

  • edge (Qt.Edge) –

alignmentRect(self, QRect) QRect
childEvent(self, QChildEvent)
connectNotify(self, QMetaMethod)
count(self) int
Return type:

int

customEvent(self, QEvent)
disconnectNotify(self, QMetaMethod)
horizontalSpacing(self) int

Returns the spacing between widgets that are laid out side by side.

Return type:

int

isSignalConnected(self, QMetaMethod) bool
itemAt(self, index: int) QLayoutItem
Parameters:

index (int) –

Return type:

QLayoutItem

minimumSize(self) QSize
Return type:

QSize

receivers(self, PYQT_SIGNAL) int
sender(self) QObject
senderSignalIndex(self) int
setGeometry(self, rect: QRect)
Parameters:

rect (QRect) –

setHorizontalSpacing(self, spacing: int)

Sets the spacing between widgets that are laid out side by side.

Parameters:

spacing (int) –

setVerticalSpacing(self, spacing: int)

Sets the spacing between widgets that are laid out on top of each other.

Parameters:

spacing (int) –

sizeHint(self) QSize
Return type:

QSize

takeAt(self, index: int) QLayoutItem
Parameters:

index (int) –

Return type:

QLayoutItem

timerEvent(self, QTimerEvent)
verticalSpacing(self) int

Returns the spacing between widgets that are laid out on top of each other.

Return type:

int

widgetEvent(self, QEvent)