How do I read the windows registry (Default) value using QSettings?
-
11-09-2019 - |
Question
I want to read the registry to find the current PowerPoint version.
However this just returns Zero:
QSettings settings("HKEY_CLASSES_ROOT\\PowerPoint.Application\\CurrVer",
QSettings::NativeFormat);
QString sReturnedValue = settings.value("(Default)", "0").toString();
Any suggestions as to how I get the value from a (default) key?
Solution
Ok, just figured it out. Whilst regedit
shows it as (Default) you just read it as Default.
QString sReturnedValue = settings.value( "Default", "0" ).toString();
Thanks for listening.
OTHER TIPS
Also, a period works:
RegReader.value(".", NULL).toString();
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow