Class: QgsRelationshipsItem¶
Contains a collection of relationship items.
Added in version 3.28.
Class Hierarchy¶
Base classes¶
Base class for all items in the model. |
|
Methods
Returns the connection URI |
|
Returns the schema for filtering relationships, if set. |
|
Returns the table name for filtering relationships, if set. |
- class qgis.core.QgsRelationshipsItem[source]¶
Bases:
QgsDataItem
- __init__(parent: QgsDataItem | None, path: str | None, connectionUri: str | None, providerKey: str | None, schema: str | None = '', tableName: str | None = '')
Constructor for QgsRelationshipsItem, with the specified
parent
item.The
path
argument gives the item path in the browser tree. Thepath
string can take any form, butQgsDataItem
items pointing to different logical locations should always use a different itempath
. TheconnectionUri
argument is the connection part of the layer URI that it is used internally to create a connection and retrieve fields information. TheproviderKey
string can be used to specify the key for theQgsDataItemProvider
that created this item.The optional
schema
andtableName
arguments can be used to restrict the visible relationships to those with a matching parent table.- Parameters:
parent (Optional[QgsDataItem])
path (Optional[str])
connectionUri (Optional[str])
providerKey (Optional[str])
schema (Optional[str] = '')
tableName (Optional[str] = '')