Class: QgsTextAnnotation

class qgis.core.QgsTextAnnotation(parent: QObject = None)

Bases: QgsAnnotation

Constructor for QgsTextAnnotation.

An annotation item that displays formatted text from a QTextDocument document.

New in version 3.0.

Parameters

parent

childEvent()
clone(self)QgsTextAnnotation
Return type

QgsTextAnnotation

connectNotify()
copyCommonProperties()
create()QgsTextAnnotation

Returns a new QgsTextAnnotation object.

Return type

QgsTextAnnotation

customEvent()
disconnectNotify()
document(self) → QTextDocument

Returns the text document which will be rendered within the annotation.

See also

setDocument()

Return type

QTextDocument

isSignalConnected()
minimumFrameSize()
readXml(self, itemElem: QDomElement, context: QgsReadWriteContext)
Parameters
receivers()
renderAnnotation(self, context: QgsRenderContext, size: QSizeF)
Parameters
sender()
senderSignalIndex()
setDocument(self, doc: QTextDocument)

Sets the text document which will be rendered within the annotation. Ownership is not transferred.

See also

document()

Parameters

doc (QTextDocument) –

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