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....

Qt Code:
  1. QSettings settings;
  2. settings.beginGroup("Settings");
  3. bool shDialog = settings.value("showDialogOnPrinting",false);
  4. checkboxShDialog->setChecked(shDialog);
To copy to clipboard, switch view to plain text mode 

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....