After several tries I have noticed the same results as you wrote. The main problem is: I dont know how to restore saved list. Any tips how to get this working?
SaveProfile() function:
QSettings.
setValue("MyProfileList", ProfileList
);
QSettings.setValue("MyProfileList", ProfileList);
To copy to clipboard, switch view to plain text mode
and in LoadProfile() function it is:
QSetting.Value("MyProfileList");
QSetting.Value("MyProfileList");
To copy to clipboard, switch view to plain text mode
I try to achieve something like this:
void on_AddProfileButton_clicked()
{
LoadProfiles(); //Read from QSettings, and fill the list with existing Profiles
AddProfile(); //Add Profile and do duplicate check
SaveProfiles(); //Save to QSettings new ProfileList
}
void on_AddProfileButton_clicked()
{
LoadProfiles(); //Read from QSettings, and fill the list with existing Profiles
AddProfile(); //Add Profile and do duplicate check
SaveProfiles(); //Save to QSettings new ProfileList
}
To copy to clipboard, switch view to plain text mode
PS:Should I use settings.beginWriteArray??
Have a nice night everyone!
Bookmarks