Results 1 to 9 of 9

Thread: C1083: Cannot open include file: 'QApplication'

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2013
    Location
    San Diego
    Posts
    37
    Thanks
    14
    Thanked 7 Times in 7 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default C1083: Cannot open include file: 'QApplication'

    Hello,

    I'm very new to Qt.
    I just installled Qt5.0.0 & MS Visual C++ Comilper 10.0 on my compuer (running Win7)

    I tried to compile and run a few programs from the Qt Creator Examples. They work.

    Then, I created a very simple project using "Empty Qt project" from Qt Creator.
    The project was created at the default location "C:\Qt\Qt5.0.0\Tools\QtCreator\bin"
    I just added one main.cpp source file with the following code:
    Qt Code:
    1. #include <QApplication>
    2. #include <QPushButton>
    3. int main(int argc, char *argv[])
    4. {
    5. QApplication app(argc, argv);
    6. QPushButton button("Run");
    7. button.show()
    8. return app.exec
    9. }
    To copy to clipboard, switch view to plain text mode 
    I tried to compile it. It didn't work and it gave me: C1083: Cannot open include file: 'QApplication'.

    I looked up on the forum for similar issues and someone said: "Add the folder of the Qt include files to the paths that are used for finding headers."
    I added it to the project file (.pro), so now it looks like this:
    Qt Code:
    1. INCLUDEPATH = C:\Qt\Qt5.0.0\5.0.0\msvc2010\include
    2. SOURCES += \
    3. main.cpp
    To copy to clipboard, switch view to plain text mode 
    but it still doesn't work...Any idea to help me with this very basic code?

    Thank you in advance!

  2. The following user says thank you to Guett_31 for this useful post:


Similar Threads

  1. Can't open include file QApplication
    By Yes in forum Newbie
    Replies: 0
    Last Post: 5th November 2011, 16:55
  2. Replies: 1
    Last Post: 23rd May 2011, 04:53
  3. Replies: 3
    Last Post: 1st November 2010, 16:33
  4. Replies: 4
    Last Post: 9th May 2010, 16:18
  5. Replies: 10
    Last Post: 15th June 2009, 19:44

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.