Class: QgsRelationContext

class qgis.core.QgsRelationContext(project: QgsProject = None)

Bases: sip.wrapper

Constructor for QgsRelationContext.

QgsRelationContext(other: QgsRelationContext) Copy constructor

Context for relations. Used to resolve layers from projects.

New in version 3.11.

Parameters

project

project(self) → QgsProject

Gets the associated project

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

Return type

QgsProject