Class: QgsConnectionRegistry¶
- class qgis.core.QgsConnectionRegistry¶
Bases:
PyQt5.QtCore.QObject
A registry for saved data provider connections, allowing retrieval of saved connections by name and provider type.
QgsConnectionRegistry
is not usually directly created, but rather accessed throughQgsApplication.connectionRegistry()
.New in version 3.14.
QgsConnectionRegistry(parent: QObject = None) Constructor for QgsConnectionRegistry.
Methods
Creates a new connection by loading the connection with the given
id
from the settings.- childEvent(self, QChildEvent)¶
- connectNotify(self, QMetaMethod)¶
- createConnection(self, name: str) QgsAbstractProviderConnection ¶
Creates a new connection by loading the connection with the given
id
from the settings.The
id
string must be of the format “provider://connection_name”, e.g. “postgres://my_connection” for the PostgreSQL connection saved as “my_connection”.Ownership is transferred to the caller.
:raises QgsProviderConnectionException
- Parameters
name (str) –
- Return type
- customEvent(self, QEvent)¶
- disconnectNotify(self, QMetaMethod)¶
- isSignalConnected(self, QMetaMethod) bool ¶
- receivers(self, PYQT_SIGNAL) int ¶
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- timerEvent(self, QTimerEvent)¶