Class: QgsAttributeEditorTextElement

class qgis.core.QgsAttributeEditorTextElement

Bases: QgsAttributeEditorElement

An attribute editor widget that will represent arbitrary text code.

Added in version 3.30.

QgsAttributeEditorTextElement(name: Optional[str], parent: Optional[QgsAttributeEditorElement]) Creates a new element which can display text

Parameters:
  • name – The name of the widget

  • parent – The parent (used as container)

QgsAttributeEditorTextElement(a0: QgsAttributeEditorTextElement)

Methods

clone

param parent:

setText

Sets the text that will be represented within this widget to text

text

The Text that will be represented within this widget.

clone(self, parent: QgsAttributeEditorElement | None) QgsAttributeEditorElement | None
Parameters:

parent (Optional[QgsAttributeEditorElement])

Return type:

Optional[QgsAttributeEditorElement]

setText(self, text: str | None)

Sets the text that will be represented within this widget to text

Parameters:

text (Optional[str])

text(self) str

The Text that will be represented within this widget.

Return type:

str