Class: QgsDataItemGuiContext

class qgis.gui.QgsDataItemGuiContext

Bases: sip.wrapper

Encapsulates the context in which a QgsDataItem is shown within the application GUI.

Added in version 3.6.

QgsDataItemGuiContext() Constructor for QgsDataItemGuiContext.

QgsDataItemGuiContext(a0: QgsDataItemGuiContext)

Methods

messageBar

Returns the associated message bar.

setMessageBar

Sets the associated message bar.

setView

Sets the associated view.

view

Returns the associated view.

messageBar(self) QgsMessageBar | None

Returns the associated message bar.

This bar can be used to provide non-blocking feedback to users.

See also

setMessageBar()

Return type:

Optional[QgsMessageBar]

setMessageBar(self, bar: QgsMessageBar | None)

Sets the associated message bar.

This bar can be used to provide non-blocking feedback to users.

See also

messageBar()

Parameters:

bar (Optional[QgsMessageBar])

setView(self, view: QgsBrowserTreeView | None)

Sets the associated view.

See also

view()

Added in version 3.28.

Parameters:

view (Optional[QgsBrowserTreeView])

view(self) QgsBrowserTreeView | None

Returns the associated view.

See also

setView()

Added in version 3.28.

Return type:

Optional[QgsBrowserTreeView]