Class: QgsHtmlWidgetWrapper

Wraps a QQuickWidget to display HTML code

Added in version 3.4.

Class Hierarchy

Inheritance diagram of qgis.gui.QgsHtmlWidgetWrapper

Base classes

QgsWidgetWrapper

Manages an editor widget Widget and wrapper share the same parent

QObject

Methods

needsGeometry

Returns true if the widget needs feature geometry

reinitWidget

Clears the content and makes new initialization

setHtmlCode

Sets the HTML code to htmlCode

class qgis.gui.QgsHtmlWidgetWrapper[source]

Bases: QgsWidgetWrapper

__init__(layer: QgsVectorLayer | None, editor: QWidget | None, parent: QWidget | None)

Create a html widget wrapper

Parameters:
  • layer (Optional[QgsVectorLayer]) – The layer on which the feature is

  • editor (Optional[QWidget]) – An editor widget. Can be None if one should be autogenerated.

  • parent (Optional[QWidget]) – A parent widget

needsGeometry(self) bool[source]

Returns true if the widget needs feature geometry

Added in version 3.20.

Return type:

bool

reinitWidget(self)[source]

Clears the content and makes new initialization

setHtmlCode(self, htmlCode: str | None)[source]

Sets the HTML code to htmlCode

Parameters:

htmlCode (Optional[str])