Class: QgsAttributeEditorSpacerElement

An attribute editor widget that will represent a spacer.

Added in version 3.30.

Class Hierarchy

Inheritance diagram of qgis.core.QgsAttributeEditorSpacerElement

Base classes

QgsAttributeEditorElement

An abstract base class for any elements of a drag and drop form.

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.core.QgsAttributeEditorSpacerElement[source]

Bases: QgsAttributeEditorElement

__init__(name: str | None, parent: QgsAttributeEditorElement | None)

Creates a new element which represents a spacer

Parameters:
  • name (Optional[str]) – The name of the widget

  • parent (Optional[QgsAttributeEditorElement]) – The parent (used as container)

__init__(a0: QgsAttributeEditorSpacerElement)
Parameters:

a0 (QgsAttributeEditorSpacerElement)

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