views:

717

answers:

1

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?

+1  A: 

Ok, just figured it out. Whilst the regedit shows it as (Default) you just read it as Default.

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

Thanks for listening.

Phil Hannent
For most things, "" means the default key, I don't see how "Default" could work, what happens when there is a real value named Default in the same key?
Anders
Qt has assert in QSettings on key.isEmpty()
Kamil Klimek