kurrachow
29th March 2011, 04:54
I have a program in windows platform ...........
I have just made up a registry like this....
chow
kurra
Settings
in the Settings key i have some string values like say "showDialogOnPrinting" which data is not set...
Now in my program i set my organisationName to chow
and my application name to kurra
and Code like this....
QSettings settings;
settings.beginGroup("Settings");
bool shDialog = settings.value("showDialogOnPrinting",false);
checkboxShDialog->setChecked(shDialog);
here the settings.value("showDialogOnPrinting",false); is supposed to set false if there is no value(According to docs the false in this case is the default/fallback value).
But that didnt set false in the registry....and the code was successfully executed..
when i change the value to true in the registry, it works good,it fetches the true and checks the box....
I have just made up a registry like this....
chow
kurra
Settings
in the Settings key i have some string values like say "showDialogOnPrinting" which data is not set...
Now in my program i set my organisationName to chow
and my application name to kurra
and Code like this....
QSettings settings;
settings.beginGroup("Settings");
bool shDialog = settings.value("showDialogOnPrinting",false);
checkboxShDialog->setChecked(shDialog);
here the settings.value("showDialogOnPrinting",false); is supposed to set false if there is no value(According to docs the false in this case is the default/fallback value).
But that didnt set false in the registry....and the code was successfully executed..
when i change the value to true in the registry, it works good,it fetches the true and checks the box....