Merging multiple Qt projects into one?



  • Hi,

    Since I could not find some concrete tutorial on this, I will assume that you won't hate me for asking this :)

    I'm doing a project that requires 11 windows and was at first (mis)instructed not to use QMainWindow, but QDialog.
    Anyway, with all that done, i ended up with 11 separate .pro files of QDialogs completely finished and was later instructed to have all the QDialogs in one QMainWindow. So my question is: Is it possible to create an new QMainWindow .pro file and to somehow include or merge( forgive my terminology) all those 11 .pro's into one QMainWindow .pro without having to do the code once again?

    Cheers



  • You need to create a "subdir":http://qt-project.org/doc/qt-5/qmake-variable-reference.html#subdirs "project":http://qt-project.org/doc/qt-5/qmake-variable-reference.html#template
    @
    TEMPLATE = subdirs

    SUBDIRS =
    MainWindowDir
    Dialog1Dir
    Dialog2Dir
    ...
    Dialog11Dir

    if there is a dependency between subproject then

    CONFIG += ordered
    @

    Put your current .pro files in the corresponding subdirs (MainWindowDir, Dialog1Dir, etc)

    QtCreator has "New project" wizard to create a "Subdir Project" in the "Other Project" list.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.