I have a QGIS processing plugin with about 30 parameters. It would be nice to be able to set some or all parameter values from a configuration file(JSON, TOML...). For example:
{
"vhm_10m": "C:/project/data/VHM_10m.tif"
...
}
As soon as the config file is chosen by the user, I would like to set the VHM_10m parameter to "C:/project/data/VHM_10m.tif" and update the GUI.
It seems not to be possible according to this post:link. I'm new to PyQGIS and I find strange that it is not possible. Is it not possible to use widget for this? If I'm not wrong, it is possible to use QWidget. Since they have a changeEvent function(link), I have the impression it may be possible.
I also saw that is possible to select multiple attributes from a parent layer in a QgsProcessingParameterField. It is not exactly what I want to do, but would it be possible to list the values contained in the config file? The user could then select which values he want to use in the config file and set the other parameters in the GUI. I guess it's not possible.