On Qt3 I have my QSettings object setup this way:
mySettings
->setPath
( "myOrg",
"myApp",
QSettings::User);
mySettings
->insertSearchPath
( QSettings::Unix,
QDir::homeDirPath() + myBaseDir
+ "/config" );
mySettings = new QSettings();
mySettings->setPath( "myOrg", "myApp", QSettings::User);
mySettings->insertSearchPath( QSettings::Unix, QDir::homeDirPath() + myBaseDir + "/config" );
To copy to clipboard, switch view to plain text mode
Looking at the Qt4 docs it looks like:
mySettings
= new QSettings("myOrg",
"myApp");
mySettings
->setPath
(QSettings::NativeFormat,
QSettings::UserScope,
QDir::homeDirPath() + myBaseDir
+ "/config");
mySettings = new QSettings("myOrg", "myApp");
mySettings->setPath(QSettings::NativeFormat, QSettings::UserScope, QDir::homeDirPath() + myBaseDir + "/config");
To copy to clipboard, switch view to plain text mode
Should do exactly the same thing but it does not. For some reason the path parameter of the of the call to QSettings::setaPath(format, scope, path) call does not do anything. How do I get this to use the path I specify for the location of the configuration file? Seems kind of strange that the Trolls would have a parameter on a call that does not do anything. So either the documentation is wrong or there is something about this that I don't understand. Anyone know what is going on with this?
Bookmarks