Class: QgsHtmlAnnotation

An annotation item that embeds HTML content.

List of all members, including inherited members

Class Hierarchy

Inheritance diagram of qgis.core.QgsHtmlAnnotation

Base classes

QgsAnnotation

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

QObject

Methods

htmlSource

Returns html source text

setHtmlSource

Sets the html source directly (not coming from a file)

setSourceFile

Sets the file path for the source HTML file.

sourceFile

Returns the file path for the source HTML file.

Static Methods

create

Returns a new QgsHtmlAnnotation object.

class qgis.core.QgsHtmlAnnotation[source]

Bases: QgsAnnotation

__init__(parent: QObject | None = None)

Constructor for QgsHtmlAnnotation.

Parameters:

parent (Optional[QObject] = None)

static create() QgsHtmlAnnotation | None[source]

Returns a new QgsHtmlAnnotation object.

Return type:

Optional[QgsHtmlAnnotation]

htmlSource(self) str[source]

Returns html source text

Return type:

str

setHtmlSource(self, htmlSource: str | None)[source]

Sets the html source directly (not coming from a file)

Parameters:

htmlSource (Optional[str])

setSourceFile(self, htmlFile: str | None)[source]

Sets the file path for the source HTML file.

See also

sourceFile()

Parameters:

htmlFile (Optional[str])

sourceFile(self) str[source]

Returns the file path for the source HTML file.

See also

setSourceFile()

Return type:

str