PDA

View Full Version : QSettings: failed to set subkey



Mint87
26th April 2013, 12:10
Hi everyone!

Got this error message: QSettings: failed to set subkey

The message is clear, but I don not have subkeys..

What else can it be?

Thank you!

Mint87
26th April 2013, 14:46
After some time I figured out that the problem is in setValue method:



QStringList documents;

for(int i=0;i<length();i++)
{
documents<<at(i);
}

settings.beginGroup("RecentFiles");
settings.setValue("FileList",documents); // the error occurs here
settings.endGroup();


It has to do smth with QStringList.

Before QStringList documents; was declared in h file, but know it works ;)

ChrisW67
26th April 2013, 22:44
beginGroup() creates a subkey.