Class: QgsHistoryWidgetContext

Contains settings which reflect the context in which a history widget is shown, e.g., an associated message bar.

Added in version 3.32.

class qgis.gui.QgsHistoryWidgetContext[source]

Bases: object

historyWidget(self) QgsHistoryWidget | None[source]

Returns the parent history widget.

Added in version 3.44.

Return type:

Optional[QgsHistoryWidget]

messageBar(self) QgsMessageBar | None[source]

Returns the message bar associated with the widget.

See also

setMessageBar()

Return type:

Optional[QgsMessageBar]

setHistoryWidget(self, widget: QgsHistoryWidget | None)[source]

Sets the parent history widget.

See also

historyWidget()

Added in version 3.44.

Parameters:

widget (Optional[QgsHistoryWidget])

setMessageBar(self, bar: QgsMessageBar | None)[source]

Sets the message bar associated with the widget. This allows the widget to push feedback messages to the appropriate message bar.

See also

messageBar()

Parameters:

bar (Optional[QgsMessageBar])