Class: QgsRelationContext

class qgis.core.QgsRelationContext

Bases: sip.wrapper

Context for relations. Used to resolve layers from projects.

New in version 3.11.

QgsRelationContext(project: QgsProject = None) Constructor for QgsRelationContext.

QgsRelationContext(other: QgsRelationContext) Copy constructor

Methods

project

Gets the associated 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