Class: QgsAttributeEditorTextElement

An attribute editor widget that will represent arbitrary text code.

Added in version 3.30.

Class Hierarchy

Inheritance diagram of qgis.core.QgsAttributeEditorTextElement

Base classes

QgsAttributeEditorElement

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

Methods

setText

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

text

The Text that will be represented within this widget.

class qgis.core.QgsAttributeEditorTextElement[source]

Bases: QgsAttributeEditorElement

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

Creates a new element which can display text

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

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

__init__(a0: QgsAttributeEditorTextElement)
Parameters:

a0 (QgsAttributeEditorTextElement)

setText(self, text: str | None)[source]

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

Parameters:

text (Optional[str])

text(self) str[source]

The Text that will be represented within this widget.

Return type:

str