<div dir="ltr">Hi,<div><br></div><div>I realize now that it's not documented for Python yet.</div><div>There is a show description in the developer guidelines: <a href="https://docs.qgis.org/3.40/en/docs/developers_guide/codingstandards.html#settings">https://docs.qgis.org/3.40/en/docs/developers_guide/codingstandards.html#settings</a></div><div><br></div><div>The important bits are to correctly create and remove the settings node for your plugin and to have only one instance of the node!</div><div>It might be easier with a real example for now:</div><div><br></div><div><div><a href="https://github.com/opengisch/qgis-swiss-locator/blob/a21df5587b59e1f1f56762e26022441ed5b5db3d/swiss_locator/swiss_locator_plugin.py#L105">https://github.com/opengisch/qgis-swiss-locator/blob/a21df5587b59e1f1f56762e26022441ed5b5db3d/swiss_locator/swiss_locator_plugin.py#L105</a></div><div><a href="https://github.com/opengisch/qgis-swiss-locator/blob/master/swiss_locator/core/settings.py">https://github.com/opengisch/qgis-swiss-locator/blob/master/swiss_locator/core/settings.py</a><br></div></div><div><br></div><div>I'll try to make the docs up to date in the future!</div><div><br></div><div>Denis</div><div><br></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">Le ven. 4 avr. 2025 à 14:56, Etienne Trimaille via QGIS-Developer <<a href="mailto:qgis-developer@lists.osgeo.org">qgis-developer@lists.osgeo.org</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi,</div><div><br></div><div>Did you find something related to plugin settings ?</div><div><br></div><div>I'm fine to update the docs if there are some hints.<br></div><div><a href="https://docs.qgis.org/3.40/en/docs/pyqgis_developer_cookbook/settings.html" target="_blank">https://docs.qgis.org/3.40/en/docs/pyqgis_developer_cookbook/settings.html</a></div><div>Or maybe better in the PyQGIS doc straight ?<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le sam. 28 déc. 2024 à 10:06, Richard Duivenvoorde via QGIS-Developer <<a href="mailto:qgis-developer@lists.osgeo.org" target="_blank">qgis-developer@lists.osgeo.org</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Dev's,<br>
<br>
What is the proper way to write plugins/QgsSettings in a plugin, AND let them (also) show up in the "new settings tree widget" ?<br>
<br>
I've tried (using the a predefined Plugins setting like in the api docs:<br>
<a href="https://qgis.org/pyqgis/master/core/QgsSettings.html#qgis.core.QgsSettings.Plugins" rel="noreferrer" target="_blank">https://qgis.org/pyqgis/master/core/QgsSettings.html#qgis.core.QgsSettings.Plugins</a>:<br>
<br>
s=QgsSettings()<br>
s.beginGroup("settingstest",QgsSettings.Plugins)<br>
s.setValue("foo", 1)<br>
s.endGroup()<br>
s.sync()<br>
<br>
Then that value shows up in the old settings widget (in 'plugins/settingstest', but not yet in the new tree.<br>
While that shows other settings.<br>
Apparently I'm missing something?<br>
Or isn't the python part not yet done?<br>
<br>
Thanks for any pointers.<br>
<br>
Regards,<br>
<br>
Richard Duivenvoorde<br>
<br>
<br>
_______________________________________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</blockquote></div>
_______________________________________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</blockquote></div>