Class: QgsRelationContext

Context for relations.

Used to resolve layers from projects.

Added in version 3.11.

List of all members, including inherited members

Constructor

__init__

Methods

project

Gets the associated project

class qgis.core.QgsRelationContext[source]

Bases: object

__init__()

Constructor for QgsRelationContext.

Note

Will be removed in QGIS 5.0. Use QgsRelationContext( QgsProject *project ) with explicit project instead.

__init__(project: QgsProject | None)

Constructor for QgsRelationContext.

Parameters:

project (Optional[QgsProject])

__init__(a0: QgsRelationContext)
Parameters:

a0 (QgsRelationContext)

project(self) → QgsProject | None[source]

Gets the associated project

If there is no associated project, then it will return the global project instance

Return type:

Optional[QgsProject]