Class: QgsSpacerWidgetWrapper

Wraps a spacer widget.

Added in version 3.30.

Class Hierarchy

Inheritance diagram of qgis.gui.QgsSpacerWidgetWrapper

Base classes

QgsWidgetWrapper

Manages an editor widget.

QObject

Methods

drawLine

Returns True if the spacer element will contain an horizontal line.

setDrawLine

Sets a flag to define if the spacer element will contain an horizontal line.

class qgis.gui.QgsSpacerWidgetWrapper[source]

Bases: QgsWidgetWrapper

__init__(layer: QgsVectorLayer | None, editor: QWidget | None = None, parent: QWidget | None = None)

Create a new widget wrapper

Parameters:
  • layer (Optional[QgsVectorLayer]) – The vector layer of the form the widget belongs to.

  • editor (Optional[QWidget] = None) – An editor widget. Can be None if one should be autogenerated.

  • parent (Optional[QWidget] = None) – A parent widget for this widget wrapper and the created widget.

drawLine(self) bool[source]

Returns True if the spacer element will contain an horizontal line.

Return type:

bool

setDrawLine(self, drawLine: bool)[source]

Sets a flag to define if the spacer element will contain an horizontal line.

Parameters:

drawLine (bool) – flag status