Class: QgsBrowserGuiModel

A model for showing available data sources and other items in a structured tree.

QgsBrowserGuiModel is the foundation for the QGIS browser panel, and includes items for the different data providers and folders accessible to users.

Added in version 3.10.

Class Hierarchy

Inheritance diagram of qgis.gui.QgsBrowserGuiModel

Base classes

QgsBrowserModel

A model for showing available data sources and other items in a structured tree.

QAbstractItemModel

QObject

Methods

setMessageBar

Sets message bar that will be passed in QgsDataItemGuiContext to data items

class qgis.gui.QgsBrowserGuiModel[source]

Bases: QgsBrowserModel

__init__(parent: QObject | None = None)

Constructor for QgsBrowserGuiModel, with the specified parent object.

Note

QgsBrowserModel models are not initially populated and use a deferred initialization approach. After constructing a QgsBrowserModel, a call must be made to initialize() in order to populate the model.

Parameters:

parent (Optional[QObject] = None)

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

Sets message bar that will be passed in QgsDataItemGuiContext to data items

Parameters:

bar (Optional[QgsMessageBar])