Class: QgsTextAnnotation

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

Bases: qgis._core.QgsAnnotation

Constructor for QgsTextAnnotation.

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

New in version 3.0: Enums

Methods

childEvent

clone

connectNotify

copyCommonProperties

create

Returns a new QgsTextAnnotation object.

customEvent

disconnectNotify

document

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

isSignalConnected

minimumFrameSize

readXml

receivers

renderAnnotation

sender

senderSignalIndex

setDocument

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

timerEvent

writeXml

Signals

Attributes

childEvent()
clone(self) → QgsTextAnnotation
connectNotify()
copyCommonProperties()
create() → QgsTextAnnotation

Returns a new QgsTextAnnotation object.

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

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

See also

setDocument()

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

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

See also

document()

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