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. error: QtGui/QApplication: No such file or directory
QtWS25 Last Chance

error: QtGui/QApplication: No such file or directory

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 3.8k 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.
  • omardavinciO Offline
    omardavinciO Offline
    omardavinci
    wrote on last edited by omardavinci
    #1

    Hi i get error with this QtGui/QApplication i cant compile Nothing i tried to use widget but it is not useful. help me?

    JKSHJ 1 Reply Last reply
    0
    • omardavinciO omardavinci

      Hi i get error with this QtGui/QApplication i cant compile Nothing i tried to use widget but it is not useful. help me?

      JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      Hi @omardavinci, and welcome to the Qt Dev Net!

      QtGui/QApplication

      This is for Qt 4. It does not exist in Qt 5. Did you see this in a tutorial? If so, please use a newer tutorial

      Anyway, you need to do 2 things:

      • Change #include <QtGui/QApplication> to #include <QApplication>
      • Add QT += widgets to your .pro file

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      omardavinciO 1 Reply Last reply
      2
      • JKSHJ JKSH

        Hi @omardavinci, and welcome to the Qt Dev Net!

        QtGui/QApplication

        This is for Qt 4. It does not exist in Qt 5. Did you see this in a tutorial? If so, please use a newer tutorial

        Anyway, you need to do 2 things:

        • Change #include <QtGui/QApplication> to #include <QApplication>
        • Add QT += widgets to your .pro file
        omardavinciO Offline
        omardavinciO Offline
        omardavinci
        wrote on last edited by omardavinci
        #3

        @JKSH Hi thx a lot one question about tutorial you refer a video tutorial or some guide? thx again

        K JKSHJ 2 Replies Last reply
        0
        • omardavinciO omardavinci

          @JKSH Hi thx a lot one question about tutorial you refer a video tutorial or some guide? thx again

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

          @omardavinci

          There is a porting guide

          Vote the answer(s) that helped you to solve your issue(s)

          1 Reply Last reply
          2
          • omardavinciO omardavinci

            @JKSH Hi thx a lot one question about tutorial you refer a video tutorial or some guide? thx again

            JKSHJ Offline
            JKSHJ Offline
            JKSH
            Moderators
            wrote on last edited by
            #5

            @omardavinci said:

            @JKSH Hi thx a lot one question about tutorial you refer a video tutorial or some guide? thx again

            I was not referring to a specific tutorial or guide. What I meant was this: If you saw QtGui/QApplication in a tutorial, that means the tutorial is too old so you shouldn't use it.

            Here is a newer one: http://doc.qt.io/qt-5/gettingstartedqt.html

            Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

            1 Reply Last reply
            1

            • Login

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