[QGIS-Developer] Load Style and Save Style forms from python code

Jacky Volpes jacky.volpes at oslandia.com
Thu May 11 02:05:41 PDT 2023


Hello,

You can try this method 
<https://api.qgis.org/api/classQgsVectorLayerProperties.html#ae4fe88fd37cdac13ee710bfcc7812799>, 
available in python bindings from 3.30:

props = QgsVectorLayerProperties(iface.mapCanvas(), iface.messageBar(), 
iface.activeLayer())
props.loadStyle() or props.saveStyleAs()

Regards,
Jacky Volpes



Le 11/05/2023 à 07:21, Giulio Fattori via QGIS-Developer a écrit :
> Good morning
> how can I recall and use the Load Style and Save Style forms from 
> python code ?
>
> Many thanks for any support
>
> Giulio
>
> _______________________________________________
> 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

-- 
Jacky Volpes

Ingénieur SIG - Oslandia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20230511/b06ec4eb/attachment.htm>


More information about the QGIS-Developer mailing list