Class: QgsAttributeEditorQmlElement

An attribute editor widget that will represent arbitrary QML code.

Added in version 3.4.

Class Hierarchy

Inheritance diagram of qgis.core.QgsAttributeEditorQmlElement

Base classes

QgsAttributeEditorElement

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

Methods

qmlCode

The QML code that will be represented within this widget.

setQmlCode

Sets the QML code that will be represented within this widget to qmlCode.

class qgis.core.QgsAttributeEditorQmlElement[source]

Bases: QgsAttributeEditorElement

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

Creates a new element which can display QML

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

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

__init__(a0: QgsAttributeEditorQmlElement)
Parameters:

a0 (QgsAttributeEditorQmlElement)

qmlCode(self) str[source]

The QML code that will be represented within this widget.

Added in version 3.4.

Return type:

str

setQmlCode(self, qmlCode: str | None)[source]

Sets the QML code that will be represented within this widget to qmlCode.

Parameters:

qmlCode (Optional[str])