Results 1 to 4 of 4

Thread: QMainWindow: No such file or directory

  1. #1
    Join Date
    Aug 2008
    Posts
    132
    Thanks
    23
    Thanked 3 Times in 3 Posts

    Default QMainWindow: No such file or directory

    Hi there

    I'm running into a very strange, or very simple problem. I have a few files in a .pro file that gets compiled into a dll. A couple of these files (MainWindow.h/cpp) does not seem to find any dependencies.

    Thiis is the important parts of my .pro file
    Qt Code:
    1. TEMPLATE = lib
    2. CONFIG += qt gui
    3. DEPENDPATH += . source ../../include ../../source ../../../Framework/Headers/Interfaces ../../../Framework/Headers/Common
    4. INCLUDEPATH += . source ../../include ../../source ../../../Framework/Headers/Interfaces ../../../Framework/Headers/Common
    5.  
    6. DEFINES += VCL_MAKE_DLL2
    7.  
    8. # Input
    9. HEADERS += source/AboutBox.h \
    10. source/MainWindow.h \
    11. source/MainWindowComponent.h \
    12. source/SplashScreen.h
    13.  
    14. FORMS += source/AboutBox.ui
    15.  
    16. SOURCES += source/AboutBox.cpp \
    17. source/MainWindow.cpp \
    18. source/MainWindowComponent.cpp
    19.  
    20. RESOURCES += MainWindow.qrc
    To copy to clipboard, switch view to plain text mode 


    Now what I can't understand is that AboutBox compiles fine and it finds the Qt Gui library without any problems. The top of the MainWindow and AboutBox headers are shown below:

    Qt Code:
    1. #ifndef MAIN_WINDOW_H
    2. #define MAIN_WINDOW_H
    3.  
    4. #include <QMainWindow>
    To copy to clipboard, switch view to plain text mode 

    Qt Code:
    1. #ifndef ABOUT_BOX_H
    2. #define ABOUT_BOX_H
    3.  
    4. #include <GCF/Common.h>
    5. #include <QDialog>
    To copy to clipboard, switch view to plain text mode 


    Can someone please help me understand how this is possible...
    Thanks
    Jaco

  2. #2
    Join Date
    May 2008
    Posts
    155
    Thanked 15 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QMainWindow: No such file or directory

    The line "CONFIG += qt gui" looks fishy. Why is it there?

  3. #3
    Join Date
    Aug 2008
    Posts
    132
    Thanks
    23
    Thanked 3 Times in 3 Posts

    Default Re: QMainWindow: No such file or directory

    I added it because it complained about not finding any Qt related classes, hoping that it would fix it.

  4. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QMainWindow: No such file or directory

    What does the compiler command look like?
    J-P Nurmi

Similar Threads

  1. install help nedded.
    By aj2903 in forum Installation and Deployment
    Replies: 9
    Last Post: 13th November 2008, 07:57
  2. qt-3.3.8 fail in scratchbox
    By nass in forum Installation and Deployment
    Replies: 0
    Last Post: 25th May 2007, 15:21
  3. errors while installing Qt4.2 in Linux
    By nimmyj in forum Installation and Deployment
    Replies: 11
    Last Post: 13th December 2006, 11:58
  4. create file in another directory
    By raphaelf in forum Qt Programming
    Replies: 3
    Last Post: 16th February 2006, 10:04
  5. Am I the only one with "make" error ?
    By probine in forum Installation and Deployment
    Replies: 1
    Last Post: 13th February 2006, 12:54

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.