How to read Windows registry value (default) using QSettings?

I want to read the registry to find the current version of PowerPoint.

However, this 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 the key (default)?

+6
c ++ qt powerpoint registry
source share
2 answers

Ok, just got it. While regedit shows it as (default), you just read it as the default.

 QString sReturnedValue = settings.value( "Default", "0" ).toString(); 

Thank you for listening.

+10
source share

The period also works:

 RegReader.value(".", NULL).toString(); 
+4
source share

All Articles