Class: QgsFormAnnotation

An annotation item that embeds a designer form showing the feature attribute

Class Hierarchy

Inheritance diagram of qgis.gui.QgsFormAnnotation

Base classes

QgsAnnotation

Abstract base class for annotation items which are drawn over a map.

QObject

Methods

designerForm

Returns the path to the Qt Designer UI file to show in the annotation.

preferredFrameSize

Returns the optimal frame size

setDesignerForm

Sets the path to the Qt Designer UI file to show in the annotation.

Static Methods

create

Returns a new QgsFormAnnotation object.

class qgis.gui.QgsFormAnnotation[source]

Bases: QgsAnnotation

__init__(parent: QObject | None = None)

Constructor for QgsFormAnnotation.

Parameters:

parent (Optional[QObject] = None)

static create() QgsFormAnnotation | None[source]

Returns a new QgsFormAnnotation object.

Return type:

Optional[QgsFormAnnotation]

designerForm(self) str[source]

Returns the path to the Qt Designer UI file to show in the annotation.

Return type:

str

preferredFrameSize(self) QSizeF[source]

Returns the optimal frame size

Return type:

QSizeF

setDesignerForm(self, uiFile: str | None)[source]

Sets the path to the Qt Designer UI file to show in the annotation.

See also

designerForm()

Parameters:

uiFile (Optional[str])