Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    [Solved] Best Qt project skeleton

    General and Desktop
    2
    7
    2646
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      Max13 last edited by

      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.

      We all have started by asking questions. Then after some time, we can begin answering them.

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        HI,

        Generally I go with something like that:

        @myProject

        • 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

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 0
        • M
          Max13 last edited by

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

          Thanks !

          We all have started by asking questions. Then after some time, we can begin answering them.

          1 Reply Last reply Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

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

            You're welcome !

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply Reply Quote 0
            • M
              Max13 last edited by

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

              We all have started by asking questions. Then after some time, we can begin answering them.

              1 Reply Last reply Reply Quote 0
              • SGaist
                SGaist Lifetime Qt Champion last edited by

                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.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply Reply Quote 0
                • M
                  Max13 last edited by

                  [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":http://qt-project.org/doc/qt-5.0/qtdoc/qmake-variable-reference.html#subdirs, I can easily tell the Project about the dependencies.

                  Thanks.

                  We all have started by asking questions. Then after some time, we can begin answering them.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post