[QGIS-Developer] QGIS variables in Python code

Ismail Sunni imajimatika at gmail.com
Wed Nov 22 03:33:38 PST 2017


Hi Andreas

If you mean QGIS variable, or project variable, or layer variable, you can
do (read, set, delete) it by using
https://qgis.org/api/classQgsExpressionContextUtils.html.

Thanks

On Wed, Nov 22, 2017 at 6:21 PM, Andreas Neumann <a.neumann at carto.net>
wrote:

> Hi,
>
> Is it possible to query the value of a QGIS variable in Python code? E.g.
> I'd like to find out in my code the full storage path to the folder of my
> current QGIS project, which would be available in the @project_folder
> variable.
>
> Are variable values accessible through the Python API?
>
> Thanks for any example or hint,
>
> Andreas
>
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer




-- 
Ismail Sunni
ismailsunni.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20171122/b5cb57e5/attachment.html>


More information about the QGIS-Developer mailing list