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. qapplication not found

qapplication not found

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
11 Posts 6 Posters 1.3k 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.
  • K Offline
    K Offline
    kdrpro1
    wrote on last edited by
    #1

    I followed the steps online, but can't solve it. Can't found qapplication, qwidgets, qmainwindow.

    屏幕截图 2024-01-02 212908.png 屏幕截图 2024-01-02 212923.png

    JonBJ 1 Reply Last reply
    0
    • K kdrpro1

      I followed the steps online, but can't solve it. Can't found qapplication, qwidgets, qmainwindow.

      屏幕截图 2024-01-02 212908.png 屏幕截图 2024-01-02 212923.png

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #2

      @kdrpro1
      Did you install Qt? How? What version? What platform?
      Do you get these errors when you compile or only while editing?
      The error which matters most is the first one, where it cannot locate the include file.

      K 1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi and welcome to devnet,

        In addition to @JonB: do you have any build failure ?

        if not, then, it looks like it might be a code model issue, which, while annoying, does not preclude you from writing and building your application.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • Christian EhrlicherC Christian Ehrlicher moved this topic from General and Desktop on
        • JonBJ JonB

          @kdrpro1
          Did you install Qt? How? What version? What platform?
          Do you get these errors when you compile or only while editing?
          The error which matters most is the first one, where it cannot locate the include file.

          K Offline
          K Offline
          kdrpro1
          wrote on last edited by
          #4

          @JonB 6.6, window, when editing. I just downloaded it yesterday, and then uninstalled webassem and 3d on maintenancetool, and then the file could not be found.
          The base class Qobject also not found

          jsulmJ 1 Reply Last reply
          0
          • K kdrpro1

            @JonB 6.6, window, when editing. I just downloaded it yesterday, and then uninstalled webassem and 3d on maintenancetool, and then the file could not be found.
            The base class Qobject also not found

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

            @kdrpro1 Does your app build?

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

            K 1 Reply Last reply
            0
            • jsulmJ jsulm

              @kdrpro1 Does your app build?

              K Offline
              K Offline
              kdrpro1
              wrote on last edited by
              #6

              @jsulm Only built the app once

              jsulmJ 1 Reply Last reply
              0
              • K kdrpro1

                @jsulm Only built the app once

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

                @kdrpro1 said in qapplication not found:

                Only built the app once

                Not sure what this means.
                But if your app builds then those errors come from the code model like @SGaist suggested.

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

                K 2 Replies Last reply
                0
                • jsulmJ jsulm

                  @kdrpro1 said in qapplication not found:

                  Only built the app once

                  Not sure what this means.
                  But if your app builds then those errors come from the code model like @SGaist suggested.

                  K Offline
                  K Offline
                  kdrpro1
                  wrote on last edited by
                  #8

                  @jsulm
                  The file cannot be found while editing.
                  And when I downloaded Qt, lots of SSl and hash issues. Then I tried again and it ok, then continued download

                  1 Reply Last reply
                  0
                  • jsulmJ jsulm

                    @kdrpro1 said in qapplication not found:

                    Only built the app once

                    Not sure what this means.
                    But if your app builds then those errors come from the code model like @SGaist suggested.

                    K Offline
                    K Offline
                    kdrpro1
                    wrote on last edited by
                    #9

                    @jsulm Found it, because my user name is Chinese, I put the project in the document, so the path has Chinese words

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      Snadzz
                      wrote on last edited by
                      #10

                      on my Qt6.7.2 I was having the same problem. My user name folder had a space in the name "HP Box 27" and I created a new user without a space in it, and ran a new project from there. It gave me QCoreApplication as the main library, and I was able to include <QtWidgets/QPushbutton> after that. I was able to include <QTWidgets/QApplication> as well and the project build and ran. I am going to run with this for now. This is what my Cmake file looks like for now, I am still able to build and run the program. 19777cd3-2e9c-4241-8dbd-edba5e511afc-image.png

                      1 Reply Last reply
                      0
                      • cristian-adamC Offline
                        cristian-adamC Offline
                        cristian-adam
                        wrote on last edited by
                        #11

                        Please report the issue at https://bugreports.qt.io/secure/CreateIssue.jspa?pid=10512

                        Both paths with spaces and Chinese characters should not pose any problems.

                        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