Retrieving REG_SZ value from Windows Registry
-
Given a registry value "SMTP Server" stored at:
"HKCU\Software\Microsoft\Internet Account Manager\Accounts\00000001"
is this correct use of QSettings to retrieve it?
QSettings sysSettings(QSettings::UserScope, "Microsoft"); sysSettings.beginGroup("Internet Account Manager/Accounts/00000001"); m_strSMTP = sysSettings.value("SMTP Server", "").toString(); sysSettings.endGroup();Thanks
D. -
I would have thought more like this:
QSettings settings("HKEY_CURRENT_USER\\Software\\Microsoft", QSettings::NativeFormat); sysSettings.beginGroup("Internet Account Manager/Accounts/00000001"); m_strSMTP = sysSettings.value("SMTP Server", "").toString(); sysSettings.endGroup();