PDA

View Full Version : SetValue



phillip_Qt
3rd October 2007, 10:47
Can any body tell me, where QSetting::SetValue() stores data while we are running it in linux platform.
Thank you all.

jpn
3rd October 2007, 10:56
It's all listed in QSettings docs: http://doc.trolltech.com/4.3/qsettings#platform-specific-notes

marcel
3rd October 2007, 10:56
I think it's in your home directory, in a directory named after the application name.
Although I am not sure.

And SetValue only stores the value in the settings. Saving the settings makes the value appear in the file.

rajesh
3rd October 2007, 10:59
I dont know about linux but in windows it saves in
HKEY_CURRENT_USER/Software/...

eg:
QSettings settings("KeyName", "subKeyname");
settings.setValue("DataName", value);
then it saves in
HKEY_CURRENT_USER/Software/keyName/subKeyname

BatteryCell
3rd October 2007, 22:45
In general the config file for linux is located at

~/.config/<Organization Name>/<Application Name>.conf

Where the file goes depends on how you set the application name / organization name in your program.

For instance:


setOrganizationName ("MyOrganization");
setApplicationName ("MyApplication");


The config file would be in

~/.config/MyOrganization/MyApplication.conf