UID:80286
Platform Format Scope Path Windows NativeFormat UserScope HKEY_CURRENT_USER\Software\* SystemScope HKEY_LOCAL_MACHINE\Software\* IniFormat UserScope %APPDATA%\*.ini SystemScope %COMMON_APPDATA%\*.iniUnix NativeFormat UserScope $HOME/.config/*.conf SystemScope /etc/xdg/*.conf IniFormat UserScope $HOME/.config/*.ini SystemScope /etc/xdg/*.iniMac OS X NativeFormat UserScope $HOME/Library/Preferences/com.*.plist SystemScope /Library/Preferences/com.*.plist IniFormat UserScope $HOME/.config/*.ini SystemScope /etc/xdg/*.ini
//Format为QSettings::NativeFormatQSettings settings("HKEY_CURRENT_USER\\Software\\Microsoft\\Office", QSettings::NativeFormat);//设置键值信息settings.setValue("11.0/Outlook/Security/DontTrustInstalledFiles", 0);//获取键值信息int value = settings.value("11.0/Outlook/Security/DontTrustInstalledFiles").toInt();
//Format为QSettings::IniFormatQSettings *setIni=new QSettings ("software", QSettings::IniFormat); //设置键值信息setIni->beginGroup("bolg"); setIni->setValue("Name", "vic.MINg"); setIni->endGroup(); //获取键值信息setIni->beginGroup("bolg"); QString resault = setIni->value("Name").toString(); setIni->endGroup(); qDebug()<<resault;
UID:107742