[QGIS-Developer] How can I save a global or project variable that is a reference to an object?

Luis Eduardo luis3176 at yahoo.com
Sun Sep 12 08:36:26 PDT 2021


HiI am working on an expression that creates an object, I need the reference to the object to be visible by other expressions.

I can create a global, project, variable with:
param='hello'param = QgsExpressionContextUtils.globalScope().variable('param')
But it only allows me to store text or numbers.
How can I store a reference to an object?
Oh how else can I achieve what I am looking for?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20210912/67375563/attachment.html>


More information about the QGIS-Developer mailing list