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.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.
  • K Offline
    K Offline
    kdrpro1
    wrote on 2 Jan 2024, 13:33 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

    J 1 Reply Last reply 2 Jan 2024, 13:48
    0
    • K kdrpro1
      2 Jan 2024, 13:33

      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

      J Offline
      J Offline
      JonB
      wrote on 2 Jan 2024, 13:48 last edited by JonB 1 Feb 2024, 13:52
      #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 3 Jan 2024, 03:38
      0
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 2 Jan 2024, 13:53 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
        • C Christian Ehrlicher moved this topic from General and Desktop on 2 Jan 2024, 15:44
        • J JonB
          2 Jan 2024, 13:48

          @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 3 Jan 2024, 03:38 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

          J 1 Reply Last reply 3 Jan 2024, 06:16
          0
          • K kdrpro1
            3 Jan 2024, 03:38

            @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

            J Offline
            J Offline
            jsulm
            Lifetime Qt Champion
            wrote on 3 Jan 2024, 06:16 last edited by
            #5

            @kdrpro1 Does your app build?

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

            K 1 Reply Last reply 3 Jan 2024, 06:45
            0
            • J jsulm
              3 Jan 2024, 06:16

              @kdrpro1 Does your app build?

              K Offline
              K Offline
              kdrpro1
              wrote on 3 Jan 2024, 06:45 last edited by
              #6

              @jsulm Only built the app once

              J 1 Reply Last reply 3 Jan 2024, 06:46
              0
              • K kdrpro1
                3 Jan 2024, 06:45

                @jsulm Only built the app once

                J Offline
                J Offline
                jsulm
                Lifetime Qt Champion
                wrote on 3 Jan 2024, 06:46 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 3 Jan 2024, 07:15
                0
                • J jsulm
                  3 Jan 2024, 06:46

                  @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 3 Jan 2024, 07:15 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
                  • J jsulm
                    3 Jan 2024, 06:46

                    @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 3 Jan 2024, 08:27 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 13 Aug 2024, 19:28 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 13 Aug 2024, 20:29 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