Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Register at least one Qt version…

Register at least one Qt version…

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
11 Posts 3 Posters 1.5k 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.
  • L Offline
    L Offline
    L. Spiro
    wrote on 5 Nov 2022, 00:46 last edited by
    #1

    Every time I add a Qt version it just disappears. I’ve done this over and over and it simply does not save the settings, at all. As soon as I press OK, the Qt version information is simply gone. Restarting Visual Studio immediately after doesn’t help.
    4ca56356-9f9c-46e9-ba62-7c8ed0920550-image.png

    As a result, I can’t create a Qt project at all.
    84fbf898-7d78-469b-88d0-40bfd90d0623-image.png

    I am using Visual Studio 2022 and installed the correct Visual Studio components via qt-vsaddin-msvc2022-2.9.1-rev.06.vsix.
    Am I doing something wrong here?

    L. Spiro

    1 Reply Last reply
    0
    • C Offline
      C Offline
      ChrisW67
      wrote on 5 Nov 2022, 01:07 last edited by
      #2

      Are you entering the path to qmake.exe, or something else, when adding the Qt version?

      L 1 Reply Last reply 5 Nov 2022, 04:10
      0
      • C Offline
        C Offline
        Chris Kawa
        Lifetime Qt Champion
        wrote on 5 Nov 2022, 02:00 last edited by
        #3

        These settings are saved in the registry under HKEY_CURRENT_USER\Software\Digia\Versions (funny that it's still under Digia).
        Open registry editor and see if your Qt version shows up there after you click OK. If not maybe you're running VS under a user that for some reason doesn't have write access to that registry key? Or maybe you installed the extension as an Administrator or another account and now can't edit these settings as a current user? If the key is not there see if it's under HKEY_LOCAL_MACHINE instead. Something along these lines maybe going on. Try running VS as an administrator and see if you can add a version then. You shouldn't have to do that, but just to check if it's this type of problem.

        Also, is T:\ a regular local drive or some sort of network share?

        1 Reply Last reply
        1
        • C ChrisW67
          5 Nov 2022, 01:07

          Are you entering the path to qmake.exe, or something else, when adding the Qt version?

          L Offline
          L Offline
          L. Spiro
          wrote on 5 Nov 2022, 04:10 last edited by
          #4

          @ChrisW67 said in Register at least one Qt version…:

          Are you entering the path to qmake.exe, or something else, when adding the Qt version?

          The path is to “T:\Qt\6.4.0\msvc2019_64\bin\qmake.exe”.
          After selecting that file the dialog truncates to “T:\Qt\6.4.0\msvc2019_64” automatically, matching the images in your link.

          @Chris-Kawa said in Register at least one Qt version…:

          These settings are saved in the registry under HKEY_CURRENT_USER\Software\Digia\Versions (funny that it's still under Digia).
          Open registry editor and see if your Qt version shows up there after you click OK. If not maybe you're running VS under a user that for some reason doesn't have write access to that registry key? Or maybe you installed the extension as an Administrator or another account and now can't edit these settings as a current user? If the key is not there see if it's under HKEY_LOCAL_MACHINE instead. Something along these lines maybe going on. Try running VS as an administrator and see if you can add a version then. You shouldn't have to do that, but just to check if it's this type of problem.

          Also, is T:\ a regular local drive or some sort of network share?

          T:\ is a regular local hard drive (partition).
          6c480ffe-7165-4df3-93e6-1a9182e8008d-image.png
          It is not under HKEY_LOCAL_MACHINE, but not set to anything in HKEY_CURRENT_USER. If I know how it is supposed to look I should be able to edit the registry directly. Running Visual Studio as admin has not resolved the issue.

          L. Spiro

          1 Reply Last reply
          0
          • C Offline
            C Offline
            Chris Kawa
            Lifetime Qt Champion
            wrote on 5 Nov 2022, 04:43 last edited by
            #5

            There should be a sub-entry for each version. Name of the node is the name that shows up in VS and it only has a single InstallDir key with the path. Here's one of mine for an example (don't mind the Polish names):

            VSToolsRegKey

            It should show up in VS after you reopen the settings dialog.

            1 Reply Last reply
            0
            • L Offline
              L Offline
              L. Spiro
              wrote on 5 Nov 2022, 05:47 last edited by
              #6

              It is still removing the setting inside Visual Studio. This is after editing the registry and then opening a new instance of Visual Studio.
              c0f3368d-8e99-46f7-bd54-7896e5cc5e0e-image.png

              What goes in DefaultQtVersion? I’ve provided my best guess here.
              7a200155-4b05-40f2-867d-813591dd6de0-image.png
              Is Qt5VS2017 causing issues? This was from an old install of a previous version on a different Visual Studio.

              L. Spiro

              1 Reply Last reply
              0
              • C Offline
                C Offline
                Chris Kawa
                Lifetime Qt Champion
                wrote on 5 Nov 2022, 06:09 last edited by
                #7

                You added it in the wrong place. Look at my screenshot. It should be under Versions, not under Digia.

                In the DefaultQtVersion goes the key name of the version you want to be default, but it's not necessary. It's just the one that the wizard will suggest when you create a project in VS, but you can pick it yourself.

                1 Reply Last reply
                0
                • L Offline
                  L Offline
                  L. Spiro
                  wrote on 5 Nov 2022, 06:20 last edited by
                  #8

                  After fixing that, the settings are now persistent between runs of Visual Studio, but I still can’t create a new project.
                  98b66082-98cb-4efd-9362-2c877c7d6f06-image.png

                  L. Spiro

                  1 Reply Last reply
                  0
                  • C Offline
                    C Offline
                    Chris Kawa
                    Lifetime Qt Champion
                    wrote on 5 Nov 2022, 14:21 last edited by
                    #9

                    Since you've had Qt installed previously - do you maybe have some Qt related environment variables, like QTDIR set or modified PATH variable to include some Qt directories? This is a common mistake that often leads to various weird tooling problems down the line.

                    1 Reply Last reply
                    0
                    • L Offline
                      L Offline
                      L. Spiro
                      wrote on 5 Nov 2022, 14:59 last edited by
                      #10

                      It appears that the only Qt environment variable I have is QtMsBuild.
                      e8fb0d3e-10ae-44cb-8f9f-283a04926116-image.png
                      Neither Path has anything for Qt.
                      fe088105-7889-4103-b7bd-34b4a68ed03f-image.png
                      66f515d1-9327-4665-84fa-415a72584817-image.png
                      Are there some that should be set but aren’t?

                      L. Spiro

                      1 Reply Last reply
                      0
                      • C Offline
                        C Offline
                        Chris Kawa
                        Lifetime Qt Champion
                        wrote on 5 Nov 2022, 22:16 last edited by
                        #11

                        Environment looks fine, nothing is missing. Sorry, I don't know what causes these issues. I don't have an idea beyond maybe reinstalling the extension. You could also run VS installer and make sure you have MSBuild installed (look in the individual components tab of the installer).

                        Beyond that you could maybe ask at the interest mailing list, where the developers of the extension are more likely to see you, or report an issue via the bugtracker and get help that way.

                        1 Reply Last reply
                        0

                        5/11

                        5 Nov 2022, 04:43

                        • Login

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