Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Unable to open .ui file in Qt Designer from Visual Studio
Forum Update on Monday, May 27th 2025

Unable to open .ui file in Qt Designer from Visual Studio

Scheduled Pinned Locked Moved Solved Installation and Deployment
10 Posts 2 Posters 4.2k 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.
  • T Offline
    T Offline
    Taytoo
    wrote on 11 Jan 2023, 18:07 last edited by
    #1

    In VS solution explorer, I used to be able to just double-click on .ui file and it will open it in Qt Designer. After upgrading to latest 5.15.12 - in which Qt Designer got updated as well. It's not working anymore.

    Now when I double-click a .ui file, I get an error message in Visual Studio "Cannot open file". I can open the file if I manually launch Qt Designer and then open that same .ui file from File menu though.

    In VS, I've tried right-clicking a .ui file and click "Open With..." the dialog afterwards does show Qt Designer as the default option. I suspect the path to Designer.exe needs to be updated but can't figure out how?

    1 Reply Last reply
    0
    • T Taytoo
      12 Jan 2023, 12:53

      There's a qwindows.dll, copied that still not working

      C Online
      C Online
      Chris Kawa
      Lifetime Qt Champion
      wrote on 12 Jan 2023, 12:54 last edited by
      #8

      @Taytoo Where did you put it? It should be in a platform folder next to the exe.

      1 Reply Last reply
      0
      • C Online
        C Online
        Chris Kawa
        Lifetime Qt Champion
        wrote on 11 Jan 2023, 20:19 last edited by Chris Kawa 1 Nov 2023, 20:21
        #2

        From what I can tell the plugin tries to get the designer from the Qt installation dir of the Qt version assigned to the project and if that fails goes through other Qt versions set up in the addin options.

        So a few questions:
        How did you install 5.15.12?
        Is it added to the Qt versions list in the plugin options?
        If you go to project options does it have the correct Qt version set?
        What happens if you try to start the designer form the plugin menu Qt VS Tools -> Launch Qt Designer?
        What is the version of your Qt plugin? Current version is 2.9.1.6
        Which Visual Studio version are you using?

        T 1 Reply Last reply 12 Jan 2023, 06:23
        0
        • C Chris Kawa
          11 Jan 2023, 20:19

          From what I can tell the plugin tries to get the designer from the Qt installation dir of the Qt version assigned to the project and if that fails goes through other Qt versions set up in the addin options.

          So a few questions:
          How did you install 5.15.12?
          Is it added to the Qt versions list in the plugin options?
          If you go to project options does it have the correct Qt version set?
          What happens if you try to start the designer form the plugin menu Qt VS Tools -> Launch Qt Designer?
          What is the version of your Qt plugin? Current version is 2.9.1.6
          Which Visual Studio version are you using?

          T Offline
          T Offline
          Taytoo
          wrote on 12 Jan 2023, 06:23 last edited by
          #3

          @Chris-Kawa said in Unable to open .ui file in Qt Designer from Visual Studio:

          From what I can tell the plugin tries to get the designer from the Qt installation dir of the Qt version assigned to the project and if that fails goes through other Qt versions set up in the addin options.

          So a few questions:
          How did you install 5.15.12?

          Two different ones: 1st one using Qt Maintenace tool, 2nd is static build (without tools)

          Is it added to the Qt versions list in the plugin options?

          Yes, both are in the list

          If you go to project options does it have the correct Qt version set?

          Project uses the static build (and compiles successfully)

          What happens if you try to start the designer form the plugin menu Qt VS Tools -> Launch Qt Designer?

          It launches

          What is the version of your Qt plugin? Current version is 2.9.1.6

          2.9.1.6

          Which Visual Studio version are you using?

          2022

          C 1 Reply Last reply 12 Jan 2023, 12:14
          0
          • T Taytoo
            12 Jan 2023, 06:23

            @Chris-Kawa said in Unable to open .ui file in Qt Designer from Visual Studio:

            From what I can tell the plugin tries to get the designer from the Qt installation dir of the Qt version assigned to the project and if that fails goes through other Qt versions set up in the addin options.

            So a few questions:
            How did you install 5.15.12?

            Two different ones: 1st one using Qt Maintenace tool, 2nd is static build (without tools)

            Is it added to the Qt versions list in the plugin options?

            Yes, both are in the list

            If you go to project options does it have the correct Qt version set?

            Project uses the static build (and compiles successfully)

            What happens if you try to start the designer form the plugin menu Qt VS Tools -> Launch Qt Designer?

            It launches

            What is the version of your Qt plugin? Current version is 2.9.1.6

            2.9.1.6

            Which Visual Studio version are you using?

            2022

            C Online
            C Online
            Chris Kawa
            Lifetime Qt Champion
            wrote on 12 Jan 2023, 12:14 last edited by
            #4

            @Taytoo said:

            2nd is static build (without tools)

            That's probably the problem. Best would be to build the tools, but if you don't want to you can probably just copy over the designer from the other build (with dependant dlls) to the bin directory of your static Qt. Or maybe you can try to just put a shortcut there? I don't know if that would work but worth a try.

            1 Reply Last reply
            0
            • T Offline
              T Offline
              Taytoo
              wrote on 12 Jan 2023, 12:29 last edited by
              #5

              Seems like thats it, but manually copying exe and releated dlls isn't working

              06fa9417-aa6e-49c0-907d-618bc4cbacf8-image.png

              I used to be able to open .ui files earlier, so why is it not working after upgrade though? There has to be a way to just get the VS to open designer.exe in non-static qt folder?

              C 1 Reply Last reply 12 Jan 2023, 12:39
              0
              • T Taytoo
                12 Jan 2023, 12:29

                Seems like thats it, but manually copying exe and releated dlls isn't working

                06fa9417-aa6e-49c0-907d-618bc4cbacf8-image.png

                I used to be able to open .ui files earlier, so why is it not working after upgrade though? There has to be a way to just get the VS to open designer.exe in non-static qt folder?

                C Online
                C Online
                Chris Kawa
                Lifetime Qt Champion
                wrote on 12 Jan 2023, 12:39 last edited by Chris Kawa 1 Dec 2023, 12:55
                #6

                @Taytoo said:

                but manually copying exe and releated dlls isn't working

                It does. You just didn't copy all of them. Copy the platform plugin too (platform/qwindows.dll).

                1 Reply Last reply
                0
                • T Offline
                  T Offline
                  Taytoo
                  wrote on 12 Jan 2023, 12:53 last edited by
                  #7

                  There's a qwindows.dll, copied that still not working

                  C 1 Reply Last reply 12 Jan 2023, 12:54
                  0
                  • T Taytoo
                    12 Jan 2023, 12:53

                    There's a qwindows.dll, copied that still not working

                    C Online
                    C Online
                    Chris Kawa
                    Lifetime Qt Champion
                    wrote on 12 Jan 2023, 12:54 last edited by
                    #8

                    @Taytoo Where did you put it? It should be in a platform folder next to the exe.

                    1 Reply Last reply
                    0
                    • T Offline
                      T Offline
                      Taytoo
                      wrote on 12 Jan 2023, 13:14 last edited by
                      #9

                      I had copied it to same folder as exe, but creating a sub-folder "platforms" and copying it there resolved the issue.

                      @Chris-Kawa said in Unable to open .ui file in Qt Designer from Visual Studio:

                      From what I can tell the plugin tries to get the designer from the Qt installation dir of the Qt version assigned to the project and if that fails goes through other Qt versions set up in the addin options.

                      In my case why isn't Qt VS plugin going through the Qt versions that I've set up and launching designer.exe from non-static version? I'm able to Launch Designer from Extension menu, so it should be possible?

                      C 1 Reply Last reply 12 Jan 2023, 13:16
                      0
                      • T Taytoo
                        12 Jan 2023, 13:14

                        I had copied it to same folder as exe, but creating a sub-folder "platforms" and copying it there resolved the issue.

                        @Chris-Kawa said in Unable to open .ui file in Qt Designer from Visual Studio:

                        From what I can tell the plugin tries to get the designer from the Qt installation dir of the Qt version assigned to the project and if that fails goes through other Qt versions set up in the addin options.

                        In my case why isn't Qt VS plugin going through the Qt versions that I've set up and launching designer.exe from non-static version? I'm able to Launch Designer from Extension menu, so it should be possible?

                        C Online
                        C Online
                        Chris Kawa
                        Lifetime Qt Champion
                        wrote on 12 Jan 2023, 13:16 last edited by
                        #10

                        @Taytoo I don't know. You can look at the plugin's source if you want.

                        1 Reply Last reply
                        0

                        1/10

                        11 Jan 2023, 18:07

                        • Login

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