It seems that the problem is in the creation of the configuration file. If I create an empty file with the same name and path (touch /home/marcello/.config/pippo/simple.conf) the error disappears, and the values are read and written correctly.
Code: Select all
QString value = settings.value("pippo/nome", QString("paperino!")).toString();
qDebug() << value;
without the configuration file:
"/home/marcello/.config/pippo/simple.conf"
"paperino!"
QFSFileEngine::open() No file name specified
But the empty directory "/home/marcello/.config/pippo is create.
With the configuration file (first esecution):
"/home/marcello/.config/pippo/simple.conf"
"paperino!"
The configuration file is writed correctly:
[pippo]
nome=pluto
second esecution:
"/home/marcello/.config/pippo/simple.conf"
"pluto"
The configuration file is read correctly.