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. QSettings HKEY_LOCAL_MACHINE
Forum Updated to NodeBB v4.3 + New Features

QSettings HKEY_LOCAL_MACHINE

Scheduled Pinned Locked Moved Unsolved General and Desktop
8 Posts 2 Posters 2.6k Views 1 Watching
  • 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.
  • Roy44R Offline
    Roy44R Offline
    Roy44
    wrote on last edited by
    #1

    Hi,

    I would like to access to a key in
    HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node in 64bits
    HKEY_LOCAL_MACHINE\SOFTWARE in 32bits

    I have to set the entire path in QSettings or use an enum ?

    thanks.
    (sorry for my english)

    raven-worxR 1 Reply Last reply
    0
    • Roy44R Roy44

      Hi,

      I would like to access to a key in
      HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node in 64bits
      HKEY_LOCAL_MACHINE\SOFTWARE in 32bits

      I have to set the entire path in QSettings or use an enum ?

      thanks.
      (sorry for my english)

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @Roy44
      IIRC this should be handled by QSettings automatically:

      QSettings settings("HKEY_LOCAL_MACHINE\\Software\\Node", QSettings::NativeFormat); // will be mapped automatically to "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Node" in 64bit
      

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      1
      • Roy44R Offline
        Roy44R Offline
        Roy44
        wrote on last edited by
        #3

        @raven-worx said in QSettings HKEY_LOCAL_MACHINE:

        QSettings settings("HKEY_LOCAL_MACHINE\Software\Node", QSettings::NativeFormat);

        The directory I try to access is :
        HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\MediaSofts\JardiCad

        I try
        QSettings test("HKEY_LOCAL_MACHINE\SOFTWARE\MediaSofts\JardiCad",QSettings::NativeFormat);
        QStringList qlkeys = test.allKeys();

        but it does not work, qlkeys is empty.

        raven-worxR 1 Reply Last reply
        0
        • Roy44R Roy44

          @raven-worx said in QSettings HKEY_LOCAL_MACHINE:

          QSettings settings("HKEY_LOCAL_MACHINE\Software\Node", QSettings::NativeFormat);

          The directory I try to access is :
          HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\MediaSofts\JardiCad

          I try
          QSettings test("HKEY_LOCAL_MACHINE\SOFTWARE\MediaSofts\JardiCad",QSettings::NativeFormat);
          QStringList qlkeys = test.allKeys();

          but it does not work, qlkeys is empty.

          raven-worxR Offline
          raven-worxR Offline
          raven-worx
          Moderators
          wrote on last edited by
          #4

          @Roy44
          escape the backslashes ... like i showed.

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          1 Reply Last reply
          1
          • Roy44R Offline
            Roy44R Offline
            Roy44
            wrote on last edited by
            #5

            sorry I double the backslash but it does not eappear in my message.

            1 Reply Last reply
            0
            • Roy44R Offline
              Roy44R Offline
              Roy44
              wrote on last edited by
              #6

              QSettings("HKEY_LOCAL_MACHINE\\SOFTWARE\\MediaSofts\\JardiCad", QSettings::NativeFormat)
              does not work.
              I'm on Qt 5.9.1

              1 Reply Last reply
              0
              • Roy44R Offline
                Roy44R Offline
                Roy44
                wrote on last edited by
                #7

                Ok It works only if I compile in 32bits

                raven-worxR 1 Reply Last reply
                0
                • Roy44R Roy44

                  Ok It works only if I compile in 32bits

                  raven-worxR Offline
                  raven-worxR Offline
                  raven-worx
                  Moderators
                  wrote on last edited by
                  #8

                  @Roy44 said in QSettings HKEY_LOCAL_MACHINE:

                  Ok It works only if I compile in 32bits

                  and what were you doing before?

                  --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                  If you have a question please use the forum so others can benefit from the solution in the future

                  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