Results 1 to 3 of 3

Thread: QtGui/QApplication : No such file or directorty

  1. #1
    Join Date
    Feb 2013
    Location
    Banzart
    Posts
    54
    Thanks
    17
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Exclamation QtGui/QApplication : No such file or directorty

    Hello
    I've downloaded this project https://github.com/owncloud/sync-qt and followed the steps mentioned below but when i compile i get this error QtGui/QApplication : No such file or directorty

    Any help please
    I'am using Qt creator 2.6.2
    based on Qt 5.0.1 (32 bit)
    My os is XP SP 2 and the creation and compilation of any created project is working well

    This is my compile Output:
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    12:12:18: Running steps for project sync_qt...
    12:12:18: Starting: "C:\Qt\Qt5.0.1\5.0.1\mingw47_32\bin\qmake.exe" "C:\Documents and Settings\sliver\Desktop\sync-qt-master\sync-qt-master\sync_qt.pro" -r -spec win32-g++ "CONFIG+=debug" "CONFIG+=declarative_debug" "CONFIG+=qml_debug" "DEFINES += OCS_USE_KWALLET"
    'getconf' is not recognized as an internal or external command,
    operable program or batch file.
    'getconf' is not recognized as an internal or external command,
    operable program or batch file.
    'getconf' is not recognized as an internal or external command,
    operable program or batch file.
    12:12:20: The process "C:\Qt\Qt5.0.1\5.0.1\mingw47_32\bin\qmake.exe" exited normally.
    12:12:20: Starting: "C:\Qt\Qt5.0.1\Tools\MinGW\bin\mingw32-make.exe"
    C:/Qt/Qt5.0.1/Tools/MinGW/bin/mingw32-make -f Makefile.Debug
    mingw32-make[1]: Entering directory 'C:/Documents and Settings/sliver/Desktop/sync-qt-master/sync_qt-build-Desktop_Qt_5_0_1_MinGW_32bit-Debug'
    g++ -c -pipe -fno-keep-inline-dllexport -g -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -DOCS_USE_KWALLET -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_SQL_LIB -DQT_XML_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -DQT_NEEDS_QMAIN -I..\sync-qt-master -I"..\sync-qt-master\qwebdav" -I"\usr\include" -I"..\..\..\..\..\Qt\Qt5.0.1\5.0.1\mingw47_32\inclu de" -I"..\..\..\..\..\Qt\Qt5.0.1\5.0.1\mingw47_32\inclu de\QtSql" -I"..\..\..\..\..\Qt\Qt5.0.1\5.0.1\mingw47_32\inclu de\QtXml" -I"..\..\..\..\..\Qt\Qt5.0.1\5.0.1\mingw47_32\inclu de\QtNetwork" -I"..\..\..\..\..\Qt\Qt5.0.1\5.0.1\mingw47_32\inclu de\QtGui" -I"..\..\..\..\..\Qt\Qt5.0.1\5.0.1\mingw47_32\inclu de\QtCore" -I"debug" -I"." -I"..\..\..\..\..\Qt\Qt5.0.1\5.0.1\mingw47_32\mkspe cs\win32-g++" -o debug\main.o ..\sync-qt-master\main.cpp
    ..\sync-qt-master\main.cpp:19:30: fatal error: QtGui/QApplication: No such file or directory
    compilation terminated.
    Makefile.Debug:693: recipe for target 'debug/main.o' failed
    mingw32-make[1]: *** [debug/main.o] Error 1
    mingw32-make[1]: Leaving directory 'C:/Documents and Settings/sliver/Desktop/sync-qt-master/sync_qt-build-Desktop_Qt_5_0_1_MinGW_32bit-Debug'
    mingw32-make: *** [debug] Error 2
    makefile:34: recipe for target 'debug' failed
    12:12:20: The process "C:\Qt\Qt5.0.1\Tools\MinGW\bin\mingw32-make.exe" exited with code 2.
    Error while building/deploying project sync_qt (kit: Desktop Qt 5.0.1 MinGW 32bit)
    When executing step 'Make'
    compilation terminated.
    Last edited by sliverTwist; 25th February 2013 at 11:16. Reason: updated contents
    Sliver_Twist

  2. #2
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: QtGui/QApplication : No such file or directorty

    QApplication and Qwidgets derived classes are in widgets module in Qt 5 so to fix that you need to add QT += widgets in the .pro file and run qmake and also use #include <QApplication> instead of #include <QtGui/QApplication> (and the code becomes compatible with both Qt 4 and 5), you can read more here
    Last edited by Zlatomir; 25th February 2013 at 13:18.

  3. The following 2 users say thank you to Zlatomir for this useful post:

    sliverTwist (25th February 2013), TheIndependentAquarius (3rd October 2013)

  4. #3
    Join Date
    Jun 2011
    Posts
    7
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Thumbs up Re: QtGui/QApplication : No such file or directorty

    Quote Originally Posted by Zlatomir View Post
    QApplication and Qwidgets derived classes are in widgets module in Qt 5 so to fix that you need to add QT += widgets in the .pro file and run qmake and also use #include <QApplication> instead of #include <QtGui/QApplication> (and the code becomes compatible with both Qt 4 and 5), you can read more here
    I had a similar problem and your solution worked. Thanks

Similar Threads

  1. QtGui/QAbstractButton no such file or directory
    By saman_artorious in forum Qt Programming
    Replies: 6
    Last Post: 22nd February 2013, 13:15
  2. Replies: 6
    Last Post: 30th November 2012, 03:58
  3. QtGui/QApplication: No such file or directory
    By codeslicer in forum Qt Programming
    Replies: 4
    Last Post: 9th December 2011, 15:29
  4. Replies: 3
    Last Post: 6th October 2009, 08:38
  5. <QtGui/QApplication> vs. <QApplication>
    By seneca in forum Qt Programming
    Replies: 5
    Last Post: 25th January 2006, 10:58

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.