[QGIS-Developer] How to set QgsSettings to show up in "new settings tree widget"

Richard Duivenvoorde rdmailings at duif.net
Sat Dec 28 00:55:41 PST 2024


Hi Dev's,

What is the proper way to write plugins/QgsSettings in a plugin, AND let them (also) show up in the "new settings tree widget" ?

I've tried (using the a predefined Plugins setting like in the api docs:
https://qgis.org/pyqgis/master/core/QgsSettings.html#qgis.core.QgsSettings.Plugins:

s=QgsSettings()
s.beginGroup("settingstest",QgsSettings.Plugins)
s.setValue("foo", 1)
s.endGroup()
s.sync()

Then that value shows up in the old settings widget (in 'plugins/settingstest', but not yet in the new tree.
While that shows other settings.
Apparently I'm missing something?
Or isn't the python part not yet done?

Thanks for any pointers.

Regards,

Richard Duivenvoorde




More information about the QGIS-Developer mailing list