views:

1637

answers:

3

I would like to divide my qt project into several directories, because it is growing pretty large. However, when I click in browser in qt-creator, there is no 'Add directory' and no such thing in 'Add new'. Can this be done somehow?

A: 

I have the same problem, and didn't find other solution then crating them manually.

Ross
+4  A: 

One method you could use is to add a project include file for each sub directory.

Qt Creator displays these in the GUI in a nested fashion, and allows you to add files to them.

e.g.

in project.pro

include(folder1/include.pri)

in folder1/include.pri

HEADERS += MyClass.h
SOURCES += MyClass.cpp

etc

Nick
Can I do this nesting from the IDE or do I have to manually set those files and dirs?
gruszczy
I had a quick look, and I think you have to add the include files manually, but when adding new files to a project Qt Creator will allow you to add them to an include file rather than the main project file.
Nick
OK, hopefully they will add this feature in new version.
gruszczy
+1  A: 

Starting from version 1.2.90 Qt Creator shows subfolders which exist in project's folder as branches in project's tree if only Filter tree option is not set to Simplify tree.

Piotr Dobrogost