hvengel
18th February 2008, 22:25
On Qt3 I have my QSettings object setup this way:
mySettings = new QSettings();
mySettings->setPath( "myOrg", "myApp", QSettings::User);
mySettings->insertSearchPath( QSettings::Unix, QDir::homeDirPath() + myBaseDir + "/config" );
Looking at the Qt4 docs it looks like:
mySettings = new QSettings("myOrg", "myApp");
mySettings->setPath(QSettings::NativeFormat, QSettings::UserScope, QDir::homeDirPath() + myBaseDir + "/config");
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?
mySettings = new QSettings();
mySettings->setPath( "myOrg", "myApp", QSettings::User);
mySettings->insertSearchPath( QSettings::Unix, QDir::homeDirPath() + myBaseDir + "/config" );
Looking at the Qt4 docs it looks like:
mySettings = new QSettings("myOrg", "myApp");
mySettings->setPath(QSettings::NativeFormat, QSettings::UserScope, QDir::homeDirPath() + myBaseDir + "/config");
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?