This is my code:
fileName
= QFileDialog::getOpenFileName(this, tr
("Open Image File"),
QDir::currentPath());
//QStringsettings
= new QSettings("Something",
"Some Thing");
//QSettingssettings->setValue("lastimage", fileName);
fileName = QFileDialog::getOpenFileName(this, tr("Open Image File"), QDir::currentPath());//QString
settings = new QSettings("Something", "Some Thing");//QSettings
settings->setValue("lastimage", fileName);
To copy to clipboard, switch view to plain text mode
The value appears in the Windows registry as it should be, but when i try to convert it back to QString it returns an empty string (the value field in the registry key is empty).
Is there something wrong with this code:
fileName = settings->value("lastimage").toString();
fileName = settings->value("lastimage").toString();
To copy to clipboard, switch view to plain text mode
or do I have to do something else ?
Bookmarks