×

Discussion Board

Results 1 to 3 of 3

Hybrid View

  1. #1
    Regular Contributor
    Join Date
    May 2009
    Posts
    146

    Subfolders in my project in Qt Creator?

    I have built a Qt Project in Carbide. I have divided all my source files into different folders to get everything more sorted and organized. So for example I have one file in src/things/MyThing.h. So in my pro file I use the following: "HEADERS += src/things/MyThing.h". If I want to include MyThing.h in another file I can just write: #include "MyThing.h". This I can do even if the other file is not in the same folder as MyThing.h. Perfect in Carbide! :-)

    Now in Qt Creator this isn't working at all. It seems like I need to have all my sources in the same folder. Is there a work around for this or do I need to move all my files to the same folder?

    Thanks!

  2. #2
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Subfolders in my project in Qt Creator?

    Quote Originally Posted by stegemann View Post
    I have built a Qt Project in Carbide. I have divided all my source files into different folders to get everything more sorted and organized. So for example I have one file in src/things/MyThing.h. So in my pro file I use the following: "HEADERS += src/things/MyThing.h". If I want to include MyThing.h in another file I can just write: #include "MyThing.h". This I can do even if the other file is not in the same folder as MyThing.h. Perfect in Carbide! :-)

    Now in Qt Creator this isn't working at all. It seems like I need to have all my sources in the same folder. Is there a work around for this or do I need to move all my files to the same folder?

    Thanks!
    You should mention all directories in INCLUDEPATH in .pro file
    http://doc.trolltech.com/4.6/qmake-v...ml#includepath

  3. #3
    Nokia Developer Expert
    Join Date
    May 2009
    Posts
    22

    Re: Subfolders in my project in Qt Creator?

    Correct, either INCLUDEPATH or DEPENDPATH will be your friend.
    http://doc.trolltech.com/4.6/qmake-v...tml#dependpath

Similar Threads

  1. Replies: 1
    Last Post: 2009-12-18, 11:09
  2. kinetic scrolling
    By stalep in forum Nokia N9
    Replies: 10
    Last Post: 2009-12-08, 12:41

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×