But that didnt set false in the registry....and the code was successfully executed..
It will not set the value in registry, it will return false if there is no such key in your settings, or it's value is not convertible to bool. So the variable shDialog will be true/false depending on the value in settings. Reading values from settings will not change the registry.
In order to set a value in registry you need to use
Qt Code:
  1. bool b = ...;
  2. ...
  3. QSettings settings;
  4. settings.beginGroup("Settings");
  5. settings.setValue("showDialogOnPrinting",b);
To copy to clipboard, switch view to plain text mode