[Solved] Organizing source files
-
ah apologies, I misunderstood your question. I thought you were seeking information on how to organize sources into subfolders in your project and so asked you to look into the Qt sources organization.
what you seek is probably not going to be addressed by the creator team .. take a look at these:
"http://bugreports.qt.nokia.com/browse/QTCREATORBUG-3265":http://bugreports.qt.nokia.com/browse/QTCREATORBUG-3265
"http://bugreports.qt.nokia.com/browse/QTCREATORBUG-902":http://bugreports.qt.nokia.com/browse/QTCREATORBUG-902 -
[quote author="chetankjain" date="1298728689"]
what you seek is probably not going to be addressed by the creator team .. take a look at these:
"http://bugreports.qt.nokia.com/browse/QTCREATORBUG-3265":http://bugreports.qt.nokia.com/browse/QTCREATORBUG-3265
"http://bugreports.qt.nokia.com/browse/QTCREATORBUG-902":http://bugreports.qt.nokia.com/browse/QTCREATORBUG-902
[/quote]Hmmm dt answers like this:
bq. We aren't a file browser.
and
bq. We don't believe that adding file system actions to the project tree is the right place. The project tree doesn't show a 1:1 mapping to the file system and as such is not really suited for that. E.g. you wouldn't see a newly created dir in the project structure.
I really disagree... I want to create folders in my project tree in Qt creator and organize my source files, just like in visual studio. i.e I want to create a folder called fx. views and then I should bee able to right click on that and create a new class, .cpp or .h and these files will be in the views folder. And of course Qt creator would also create the folder and etc. in the project folder and update the .pro file so everything would compile...
I find this a very basic feature which helps allot in keeping large projects with many source files organized.
Its very hard to find files you need, when you only have a folder for the sources and headers. It gets very frustrating when you have 50+ .cpp and .h files...
How do people using Qt creator manage all their source file in large projects ?
BR
DarkRoast -
good points DarkRoast, and having used various IDE's over time myself, I understand what you mean.
Unfortunately there is no "Postponed" state or the likes in Qt bug tracker and I find many times bugs are closed as "out of scope at present".
You could try to reopen the above bugs and vote for it. Other interested developers could also vote for its priority and if sufficient votes are there, who knows it might just get taken up. Or someone from community could contribute ... -
[quote author="chetankjain" date="1298732843"]I work only with Qt creator for coding in Qt :) and it is evolving continuously which is good[/quote]
I wonder how much Qtcreator evolving is going on now in the Qt department ...? Now when Nokia has sold its soul to Microsoft.
-
there have been many varying blog posts and comments on this topic ... but as far as I know, no announcement made so far about ramping down efforts on Qt. And its just a partnership with MS and not a sale :) ... so I'm not really worried about Qt dying. There is also the community to further support Qt under any circumstance
-
The project viewer is meant to visualize the project structure, not the locations in a file system. It is not a file system browser. Feel free to use that instead if you want to see your files grouped by location in the filesystem.
If you are using qmake to build your sources you can structure the project tree by introducing .pri files. The project viewer does group files based on which pro/pri file they belong to. Visualizing the project structure is what it is supposed to do after all.
Just open Qt Creator's pro file for an example on how that looks.
I basically do all my navigation by using the F2, F4 and Ctrl-K key combos. Especially the last one (locator) is really powerful and gets me to classes, methods, files, etc. without having to bother about where the code is located in the filesystem/project structure.
-
Thank you very much Tobias!
.pri files do exactly what I need :) This is what I did:
.pro:
@.
.
.
include(Business.pri)
.@The .pri file:
@INCLUPATH += Business # Creates the folder Business in project tree
SOURCES += business.cpp \ # Creates a folder Sources in the Business folder
HEADERS += business.h # Creates a folder Headers in the business folder @
This way I can organize and sort my .cpp an .h files :)
Thanks!
DarkRoast