In windows 7, Use QSettings visit registory,Some Keys and Values do not show.
-
In windows 7, Use QSettings visit registory,Some Keys and Values do not show.
My code as below:
void MainWindow::on_pushButton_clicked()
{
ui->listWidget->clear();
QString str = ui->lineEdit->text();
QSettings reg(str, QSettings::NativeFormat);
QStringList keyList=reg.childKeys();
foreach(QString key, keyList)
{
QString location=reg.value(key).toString();
if(!location.isEmpty())
{
ui->listWidget->addItem(key + " = " + location);
}
}
}
user regedit I can see 4 keys,bug my qt code only show 3 keys. I user Qt4.8.7 and Qt5.8.0,has the same problom. the picture as below:
-
Your Qt application is showing 32bit side and regedit 64bit (notice different InstallRoot value).
Windows separates registry for 64bit and 32bit environment check if either path has some WOW64 part.