How do I add an entire directory to a QT creator project
The simplest way is to directly edit your .pro file, add HEADERS += mydir/*.h
and SOURCES += mydir/*.cpp
and the contents of the whole directory will show up in QT Creator. Further reference: http://qt-project.org/doc/qt-5/qmake-project-files.html
Open a terminal, navigate to the folder where you want to have you project file, and then run the command
qmake -project
This will search the current directory and all subdirectories for files with extensions such as .c
, .cpp
, .h
, etc. (the full list is found by typing man qmake
).
But keep in mind that it will overwrite your current .pro file if you already have a project set up.