Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. In windows 7, Use QSettings visit registory,Some Keys and Values do not show.
QtWS25 Last Chance

In windows 7, Use QSettings visit registory,Some Keys and Values do not show.

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 592 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    Frankkon
    wrote on last edited by Frankkon
    #1

    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:
    1_1499156529061_qt-show.png 0_1499156529060_regedit-show.png

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tomma
      wrote on last edited by
      #2

      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.

      F 1 Reply Last reply
      1
      • T tomma

        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.

        F Offline
        F Offline
        Frankkon
        wrote on last edited by
        #3

        @tomma ,Thank you very much . yes, you are right. I find the problem immediately when I posted it.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved