First I tried to use ctkAppLauncherSettings as it is done in qSlicerCoreApplication but then I understood that ctkAppLauncherSettings doesn’t privide API to overwrite values in file. To do that I would need to work with settings as with usual textual file.
I decided to use userSettings (QSettings class) for now:
By the way I don’t know should this work or not but it doesn’t:
settings=qt.QSettings(slicer.app.launcherSettingsFilePath, 1) # 1 is QSettings::IniFormat I could not find this enum in python
I expected that settings retrieves information from slicer.app.launcherSettingsFilePath.ini file and I could work with it as with QSettings.
But settings.allKeys() returns empty list.
And settings.fileName() shows '/home/kerim/.config/home/kerim/Documents/Colada/Colada-0.1.0-2022-04-17-linux-amd64/bin/ColadaLauncherSettings.ini/1.conf'
While slicer.app.launcherSettingsFilePath returns '/home/kerim/Documents/Colada/Colada-0.1.0-2022-04-17-linux-amd64/bin/../bin/ColadaLauncherSettings.ini'
As you can see settings.fileName() adds /1.conf at the end.
Am I misunderstanding something?