Search code examples
c++qtregistrypowerpoint

How do I read the windows registry (Default) value using QSettings?


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();