How did you create QSettings object? It should be done this way:
Qt Code:
  1. QSettings settings("HKEY_CLASSES_ROOT\\txtfile",QSettings::NativeFormat);
  2. // Then edit subkeys.
  3. settings.setValue("DefaultIcon", "\"D:\\Work space\\MY Projects\\executable\\MyEditor.exe,0\"");
To copy to clipboard, switch view to plain text mode