Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Project folder hierarchy and subprograms help
vezprog last edited by
So this is something that has been lingering with me throughout my Qt4 project ive been working on for a little while now. I just recently started looking into Qt folder structures in the Qt Creator and am a little confused, but here is what I am trying to do.
I have a main program that contains a form with multiple buttons. When one of those buttons is "clicked", a new application spawns in its own thread using QProcess (this application is its own executable built on a separate project right now, I have 8 project folders and would like to condense it into one project).
So for example, this is what my folder structure looks like.
Right now, each one of those executable's in the drivers folder is built separately from their own .pro file in their own application folder, then once built, it is copied into the main programs folder structure so the QProcess calls work correctly.
I have about 9 executables that can spawn from the main program, each having their own main form. The purpose of this was so if there was a bug found in one of the sub drivers, it would be easy to fix, all i would have to do is rebuild the single executable and replace the old. Likewise with any of the sub executable's.
My question here is, can I have one main project, then have sub projects within the main project that get built as well (I do this in eclipse when doing c++ projects) with there own executable's, so I don't have to worry about copying all the executable's into the main folder?
I have looked online for a good example and haven't been able to find one yet. I know there is the .pri files.
p.s. I am going to be using this crossplatform between linux and windows (currently developing in linux).
Hostel last edited by
In .pro file you have a variable TEMPLATE - default is app. You can try use a - "subdirs template":http://developer.qt.nokia.com/doc/qt-4.8/qmake-project-files.html#project-templates
Check also "DEPENDPATH":http://developer.qt.nokia.com/doc/qt-4.8/qmake-variable-reference.html#dependpath - this can be done from Qt Creator interface.
You can also think about change executable[1-5] from app to dynamic libs or plugins.