Class: QgsConnectionsRootItem

class qgis.core.QgsConnectionsRootItem(parent: QgsDataItem, name: str, path: str = '', providerKey: str = '')

Bases: QgsDataCollectionItem

Constructor for QgsConnectionsRootItem, with the specified parent item.

The name argument specifies the text to show in the model for the item. A translated string should be used wherever appropriate.

The path argument gives the item path in the browser tree. The path string can take any form, but QgsSchemaItem items pointing to different logical locations should always use a different item path.

The optional providerKey string can be used to specify the key for the QgsDataItemProvider that created this item.

A Collection that represents a root group of connections from a single data provider

New in version 3.16.

  • parent (QgsDataItem) –

  • name (str) –

  • path (str = '') –

  • providerKey

childEvent(self, QChildEvent)
connectNotify(self, QMetaMethod)
customEvent(self, QEvent)
deferredDelete(self) → bool

The item is scheduled to be deleted. E.g. if deleteLater() is called when item is in Populating state (createChildren() running in another thread), the deferredDelete() returns True and item will be deleted once Populating finished. Items with slow reateChildren() (for example network or database based) may check during createChildren() if deferredDelete() returns True and return from createChildren() immediately because result will be useless.

disconnectNotify(self, QMetaMethod)
homeDirIcon() → QIcon

Shared home directory icon.

New in version 3.4.

isSignalConnected(self, QMetaMethod) → bool
openDirIcon() → QIcon

Shared open directory icon.

New in version 3.4.

populate(self, children: object)

populate(self, foreground: bool = False)

receivers(self, PYQT_SIGNAL) → int
refresh(self, children: object)

Refresh the items from a specified list of child items.


sender(self) → QObject
senderSignalIndex(self) → int
timerEvent(self, QTimerEvent)

Will request a repaint of this icon.

New in version 3.0.