Class: QgsTextAnnotation¶
An annotation item that displays formatted text from a QTextDocument document.
Class Hierarchy¶
Base classes¶
Abstract base class for annotation items which are drawn over a map. |
|
- class qgis.core.QgsTextAnnotation[source]¶
Bases:
QgsAnnotation- __init__(parent: QObject | None = None)
Constructor for QgsTextAnnotation.
- Parameters:
parent (Optional[QObject] = None)
- static create() QgsTextAnnotation | None[source]¶
Returns a new
QgsTextAnnotationobject.- Return type:
Optional[QgsTextAnnotation]
- document(self) QTextDocument | None[source]¶
Returns the text document which will be rendered within the annotation.
See also
- Return type:
Optional[QTextDocument]
- setDocument(self, doc: QTextDocument | None)[source]¶
Sets the text document which will be rendered within the annotation. Ownership is not transferred.
See also
- Parameters:
doc (Optional[QTextDocument])