Class: QgsProjectItem

class qgis.core.QgsProjectItem(parent: QgsDataItem, name: str, path: str)

Bases: QgsDataItem

A data item holding a reference to a QGIS project file.

Parameters
  • parent (QgsDataItem) – The parent data item.

  • name (str) – The name of the of the project. Displayed to the user.

  • path (str) – The full path to the project.

Data item that can be used to represent QGIS projects.

Methods

childEvent

connectNotify

customEvent

deferredDelete

The item is scheduled to be deleted.

disconnectNotify

hasDragEnabled

rtype

bool

isSignalConnected

mimeUri

rtype

QgsMimeDataUtils.Uri

populate

populate(self, foreground: bool = False)

receivers

refresh

Refresh the items from a specified list of child items.

sender

senderSignalIndex

timerEvent

updateIcon

Will request a repaint of this icon.

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)
hasDragEnabled(self) → bool
Return type

bool

isSignalConnected(self, QMetaMethod) → bool
mimeUri(self) → QgsMimeDataUtils.Uri
Return type

QgsMimeDataUtils.Uri

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.

refresh(self)

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

Will request a repaint of this icon.

New in version 3.0.