Important: Please read the Qt Code of Conduct -

[Solved] Best Qt project skeleton

  • Hello world!

    I'm on a private project (on github) which is using one of my libraries, publicly available on Github.
    I was wondering what could be the best project skeleton for a Qt/classic project?

    And also, the best way to include my lib to the project? For example, symfony is using composer, you put in a json etc... I can use git-submodules to handle it, but I'm still wondering about the internal directories structure of my project.

    What is the community saying about that ?
    Thank for your help.

  • Lifetime Qt Champion


    Generally I go with something like that:


    • apps <- can contain one or several apps
      • myApp
        • src
        • tests <-- app specific tests
    • libs
      • myLib
        • src
        • tests <-- lib specific tests
      • myExternalLib1
      • tests <-- "libs interaction" tests

    Hope it helps

  • It seems really a guid directory structure.
    It allows the "subdirectory" structure of qt-creator.

    Thanks !

  • Lifetime Qt Champion

    That's exactly the point, subdirectories to have each "entity" managed separately :)

    You're welcome !

  • BTW: Using git-submodules for this type of structure, is it appropriate ?

  • Lifetime Qt Champion

    No problem with that (unless your additional library are using a different build system, then it can get complicated)

    If you have 3rd party dependencies (as in i.e. only binary available) I personally use an additional folder names 3rdparty for them.

  • [quote author="SGaist" date="1371332989"]If you have 3rd party dependencies.[/quote]
    Actually I don't know how can it be called but my apps needs a library (made on Qt too). According to "SUBDIRS":, I can easily tell the Project about the dependencies.


Log in to reply