Hi,
Yes, that's the point. I was surprised by the fact that those variables where
stored as part of the exported qml file.
I was trying to set those variable in processing algorithm so that I could
achieve some parametrization of the style associated with the processing
output, but no luck
si
Hi David,
Variables are a part of QML / Layer Style. There is a QEP open about
handling of this:
https://github.com/qgis/QGIS-Enhancement-Proposals/issues/125
While variables are not explicitly mentioned in there, it would be good
to treat them in the same way. I.e. allow exporting and importing
Hi David,
this sounds like a bug, so I would say: create an issue with clear steps
so others can reproduce/fix BUT I cannot reproduce. Doing your steps
I see 'FOO' is just saved in the project file (and viewable after
unzipping the qgz file)
And even after loading the qml and restartnig QG
Just found out that this is not addMapLayer that remove the variables but
'layer.loadNamedStyle'
Print layer.customProperty('variableNames') just before calling
'layer.loadNamedStyle' show variables
Print layer.customProperty('variableNames') just after the call : empty list
Reproduced in the
Hi
I'm trying to set custom layers variables from processing using
QgsExpressionContextUtils.setLayerVariables to destination layers , I have
found that those variables does not appear in
Qgis.
I have found that when the layer is inserted in the current project
(https://github.com/qgis/QGIS