Class: QgsBrowserGuiModel

class qgis.gui.QgsBrowserGuiModel(parent: QObject = None)

Bases: QgsBrowserModel

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.

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.

New in version 3.10.

Parameters

parent

addRootItems(self)

Populates the model

QgsBrowserGuiModel.beginInsertColumns(self, QModelIndex, int, int)
QgsBrowserGuiModel.beginInsertRows(self, QModelIndex, int, int)
QgsBrowserGuiModel.beginMoveColumns(self, QModelIndex, int, int, QModelIndex, int) -> bool
QgsBrowserGuiModel.beginMoveRows(self, QModelIndex, int, int, QModelIndex, int) -> bool
QgsBrowserGuiModel.beginRemoveColumns(self, QModelIndex, int, int)
QgsBrowserGuiModel.beginRemoveRows(self, QModelIndex, int, int)
beginResetModel(self)
QgsBrowserGuiModel.changePersistentIndex(self, QModelIndex, QModelIndex)
changePersistentIndexList(self, Iterable[QModelIndex], Iterable[QModelIndex])
childEvent(self, QChildEvent)
connectNotify(self, QMetaMethod)
QgsBrowserGuiModel.createIndex(self, int, int, object: object = 0) -> QModelIndex
customEvent(self, QEvent)
QgsBrowserGuiModel.decodeData(self, int, int, QModelIndex, QDataStream) -> bool
disconnectNotify(self, QMetaMethod)
dropMimeData(self, data: QMimeData, action: Qt.DropAction, row: int, column: int, parent: QModelIndex)bool
Parameters
  • data (QMimeData) –

  • action (Qt.DropAction) –

  • row (int) –

  • column (int) –

  • parent (QModelIndex) –

Return type

bool

encodeData(self, Iterable[QModelIndex], QDataStream)
endInsertColumns(self)
endInsertRows(self)
endMoveColumns(self)
endMoveRows(self)
endRemoveColumns(self)
endRemoveRows(self)
endResetModel(self)
flags(self, index: QModelIndex)Qt.ItemFlags
Parameters

index (QModelIndex) –

Return type

Qt.ItemFlags

isSignalConnected(self, QMetaMethod)bool
persistentIndexList(self)List[QModelIndex]
receivers(self, PYQT_SIGNAL)int
removeRootItems(self)
resetInternalData(self)
sender(self)QObject
senderSignalIndex(self)int
setData(self, index: QModelIndex, value: Any, role: int = Qt.EditRole)bool
Parameters
  • index (QModelIndex) –

  • value (Any) –

  • role (int = Qt.EditRole) –

Return type

bool

setMessageBar(self, bar: QgsMessageBar)

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

Parameters

bar (QgsMessageBar) –

timerEvent(self, QTimerEvent)