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. The problem is that you can't find the header file starting with ui.

The problem is that you can't find the header file starting with ui.

Scheduled Pinned Locked Moved Unsolved General and Desktop
15 Posts 4 Posters 2.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.
  • C ChrisW67

    That file is generated from the corresponding WTest.ui file that should be listed in the PRO file FORMS variable.

    I Offline
    I Offline
    IknowQT
    wrote on last edited by
    #3

    @ChrisW67

    Why can't I find a path when it's easy to create?

    jsulmJ 1 Reply Last reply
    0
    • I IknowQT

      @ChrisW67

      Why can't I find a path when it's easy to create?

      jsulmJ Online
      jsulmJ Online
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #4

      @IknowQT said in The problem is that you can't find the header file starting with ui.:

      Why can't I find a path when it's easy to create?

      Again: ui_WTest.h will be generated when you build your app, before you build it does NOT exist!
      Did you do what @ChrisW67 suggested? "hat file is generated from the corresponding WTest.ui file that should be listed in the PRO file FORMS variable" - so, is WTest.ui in your pro file in the FORMS variable?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      I 1 Reply Last reply
      2
      • jsulmJ jsulm

        @IknowQT said in The problem is that you can't find the header file starting with ui.:

        Why can't I find a path when it's easy to create?

        Again: ui_WTest.h will be generated when you build your app, before you build it does NOT exist!
        Did you do what @ChrisW67 suggested? "hat file is generated from the corresponding WTest.ui file that should be listed in the PRO file FORMS variable" - so, is WTest.ui in your pro file in the FORMS variable?

        I Offline
        I Offline
        IknowQT
        wrote on last edited by
        #5

        @jsulm

        # ----------------------------------------------------
        # This file is generated by the Qt Visual Studio Tools.
        # ------------------------------------------------------
        
        # This is a reminder that you are using a generated .pro file.
        # Remove it when you are finished editing this file.
        message("You are running qmake on a generated .pro file. This may not work!")
        
        
        HEADERS += ./MainWidget.h \
            ./WTest.h \
            ./WLogin.h
        SOURCES += ./MainWidget.cpp \
            ./main.cpp \
            ./WLogin.cpp \
            ./WTest.cpp
        FORMS += ./MainWidget.ui \
            ./WLogin.ui \
            ./WTest.ui
        RESOURCES += MainWidget.qrc
        
        

        I checked that it is in the path and if I build with debug, I also checked that it is created in x64\debug\uic, but the same message still appears.

        jsulmJ 1 Reply Last reply
        0
        • I IknowQT

          @jsulm

          # ----------------------------------------------------
          # This file is generated by the Qt Visual Studio Tools.
          # ------------------------------------------------------
          
          # This is a reminder that you are using a generated .pro file.
          # Remove it when you are finished editing this file.
          message("You are running qmake on a generated .pro file. This may not work!")
          
          
          HEADERS += ./MainWidget.h \
              ./WTest.h \
              ./WLogin.h
          SOURCES += ./MainWidget.cpp \
              ./main.cpp \
              ./WLogin.cpp \
              ./WTest.cpp
          FORMS += ./MainWidget.ui \
              ./WLogin.ui \
              ./WTest.ui
          RESOURCES += MainWidget.qrc
          
          

          I checked that it is in the path and if I build with debug, I also checked that it is created in x64\debug\uic, but the same message still appears.

          jsulmJ Online
          jsulmJ Online
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #6

          @IknowQT Why do you have ./ in front of every file you add to your project?

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          I 1 Reply Last reply
          0
          • jsulmJ jsulm

            @IknowQT Why do you have ./ in front of every file you add to your project?

            I Offline
            I Offline
            IknowQT
            wrote on last edited by
            #7

            @jsulm

            Is there any reason the path is different in front?
            Even when I try to create a new project, I get the same error.

            jsulmJ 1 Reply Last reply
            0
            • I IknowQT

              @jsulm

              Is there any reason the path is different in front?
              Even when I try to create a new project, I get the same error.

              jsulmJ Online
              jsulmJ Online
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #8

              @IknowQT said in The problem is that you can't find the header file starting with ui.:

              Is there any reason the path is different in front?

              I don't know what this means.

              "Even when I try to create a new project, I get the same error" - what type of project do you create? Create a widgets project - that one should work and you also can see how pro file should look like.

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              I 1 Reply Last reply
              0
              • jsulmJ jsulm

                @IknowQT said in The problem is that you can't find the header file starting with ui.:

                Is there any reason the path is different in front?

                I don't know what this means.

                "Even when I try to create a new project, I get the same error" - what type of project do you create? Create a widgets project - that one should work and you also can see how pro file should look like.

                I Offline
                I Offline
                IknowQT
                wrote on last edited by IknowQT
                #9

                @jsulm

                It means there is something wrong with my widget project path, so I created a new project, but the same problem occurs.
                The newly created project path is the same.

                J.HilkJ 1 Reply Last reply
                0
                • I IknowQT

                  @jsulm

                  It means there is something wrong with my widget project path, so I created a new project, but the same problem occurs.
                  The newly created project path is the same.

                  J.HilkJ Offline
                  J.HilkJ Offline
                  J.Hilk
                  Moderators
                  wrote on last edited by
                  #10

                  @IknowQT
                  make sure your project path has no special characters in it, no whitespaces no unicode etc.


                  Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                  Q: What's that?
                  A: It's blue light.
                  Q: What does it do?
                  A: It turns blue.

                  I 1 Reply Last reply
                  0
                  • J.HilkJ J.Hilk

                    @IknowQT
                    make sure your project path has no special characters in it, no whitespaces no unicode etc.

                    I Offline
                    I Offline
                    IknowQT
                    wrote on last edited by
                    #11

                    @J-Hilk

                    What I really don't understand is that MainWidget.ui and WLogin.ui files are accessible? Why is it only like Test, which is the same condition?

                    J.HilkJ 1 Reply Last reply
                    0
                    • I IknowQT

                      @J-Hilk

                      What I really don't understand is that MainWidget.ui and WLogin.ui files are accessible? Why is it only like Test, which is the same condition?

                      J.HilkJ Offline
                      J.HilkJ Offline
                      J.Hilk
                      Moderators
                      wrote on last edited by
                      #12

                      @IknowQT how did you create your WTest class, I don't think you used the wizard, because it has non default stuff in it like #pragma once and missing explicit keyword for the constructor.
                      are you sure the (raw)ui file actually exists ?


                      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                      Q: What's that?
                      A: It's blue light.
                      Q: What does it do?
                      A: It turns blue.

                      I 1 Reply Last reply
                      0
                      • J.HilkJ J.Hilk

                        @IknowQT how did you create your WTest class, I don't think you used the wizard, because it has non default stuff in it like #pragma once and missing explicit keyword for the constructor.
                        are you sure the (raw)ui file actually exists ?

                        I Offline
                        I Offline
                        IknowQT
                        wrote on last edited by
                        #13

                        @J-Hilk

                        I checked that it was created in the x64\debug\uic path, only Wtest can't access it...

                        J.HilkJ 1 Reply Last reply
                        0
                        • I IknowQT

                          @J-Hilk

                          I checked that it was created in the x64\debug\uic path, only Wtest can't access it...

                          J.HilkJ Offline
                          J.HilkJ Offline
                          J.Hilk
                          Moderators
                          wrote on last edited by
                          #14

                          @IknowQT
                          WTest.ui has the path x64\debug\uic\WTest.ui ?

                          because thats not the one you specified in the project file


                          Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                          Q: What's that?
                          A: It's blue light.
                          Q: What does it do?
                          A: It turns blue.

                          I 1 Reply Last reply
                          0
                          • J.HilkJ J.Hilk

                            @IknowQT
                            WTest.ui has the path x64\debug\uic\WTest.ui ?

                            because thats not the one you specified in the project file

                            I Offline
                            I Offline
                            IknowQT
                            wrote on last edited by
                            #15

                            @J-Hilk
                            Exactly ui_WTest.h.
                            In that path, the files that I said were accessible are also in the same path.

                            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