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. Win7 : Error c1083: Cannot open include file: QApplication: no such file or directory
Forum Updated to NodeBB v4.3 + New Features

Win7 : Error c1083: Cannot open include file: QApplication: no such file or directory

Scheduled Pinned Locked Moved Installation and Deployment
5 Posts 4 Posters 25.3k Views 1 Watching
  • 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.
  • F Offline
    F Offline
    FrankyQt123
    wrote on last edited by
    #1

    Hi , i have this problem on Windows:

    Installed MSVs 2010 ultimate
    Qt 5

    When creating an Empty Qt Project, add new c++ source and just put #include <QApplication>
    i get the error.

    Qt Projects show:

    INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE;c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include;C:\Qt\Qt5.0.0\5.0.0\msvc2010\include
    LIB=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\LIB;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\LIB;c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib;C:\Qt\Qt5.0.0\5.0.0\msvc2010\lib

    INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE;c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include;C:\Qt\Qt5.0.0\5.0.0\msvc2010\include
    LIB=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\LIB;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\LIB;c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib;C:\Qt\Qt5.0.0\5.0.0\msvc2010\lib

    any idea what is going wrong ?

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      In your .pro file:
      @
      QT += core gui widgets
      @

      And it should work. If not, then add this include:
      @
      #include <QtWidgets/QApplication>
      @

      (Z(:^

      1 Reply Last reply
      0
      • F Offline
        F Offline
        FrankyQt123
        wrote on last edited by
        #3

        Hi THX for the reply, but it didn't helped.

        I'm new with Qt and folled Youtube http://www.youtube.com/watch?v=Gk3zh5lA4ww

        Got it worked this way:

        Instaed of create an Empty Qt Project; create a Qt Gui App
        and delete the Form etc....now it works.

        THX

        1 Reply Last reply
        0
        • S Offline
          S Offline
          steno
          wrote on last edited by
          #4

          With an empty Qt Project, you could have right clicked on the solution and edited the qt project settings by adding the Qt Gui library that way.

          1 Reply Last reply
          0
          • C Offline
            C Offline
            Croydon
            wrote on last edited by
            #5

            Also, you can simply right click on the project/solution name (in the TreeView) and click in "Run qmake", after doing it, rebuild or run the project.

            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