Class: QgsFormAnnotation

class qgis.gui.QgsFormAnnotation(parent: QObject = None)

Bases: QgsAnnotation

Constructor for QgsFormAnnotation.

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

New in version 3.0.

Parameters

parent

childEvent(self, QChildEvent)
clone(self)QgsFormAnnotation
Return type

QgsFormAnnotation

connectNotify(self, QMetaMethod)
copyCommonProperties(self, target: QgsAnnotation)

Copies common annotation properties to the targe annotation. Can be used within QgsAnnotation.clone() implementations to assist with creating copies.

create()QgsFormAnnotation

Returns a new QgsFormAnnotation object.

Return type

QgsFormAnnotation

customEvent(self, QEvent)
designerForm(self) → str

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

Return type

str

disconnectNotify(self, QMetaMethod)
isSignalConnected(self, QMetaMethod) → bool
minimumFrameSize(self) → QSizeF
Return type

QSizeF

preferredFrameSize(self) → QSizeF

Returns the optimal frame size

Return type

QSizeF

readXml(self, itemElem: QDomElement, context: QgsReadWriteContext)
Parameters
receivers(self, PYQT_SIGNAL) → int
renderAnnotation(self, context: QgsRenderContext, size: QSizeF)
Parameters
sender(self) → QObject
senderSignalIndex(self) → int
setAssociatedFeature(self, feature: QgsFeature)
Parameters

feature (QgsFeature) –

setDesignerForm(self, uiFile: str)

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

See also

designerForm()

Parameters

uiFile (str) –

timerEvent(self, QTimerEvent)
writeXml(self, elem: QDomElement, doc: QDomDocument, context: QgsReadWriteContext)
Parameters