Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. advanced docking system - how can I implement it to a project
Forum Update on Monday, May 27th 2025

advanced docking system - how can I implement it to a project

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 3 Posters 1.7k Views
  • 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.
  • D Offline
    D Offline
    Dabrzn
    wrote on 29 May 2024, 12:18 last edited by Dabrzn
    #1

    I want to use the "advanced docking system" from https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System. I opened the ads.pro file with QT and build it successfully. Now I have a build-folder with some sub-folders like "lib" (contains one .dll and .a file) and "src". The src folder includes a "debug" folder with a lot .o and .cpp files.
    I'm using QT Creator on Windows 10.
    I have no idea how to "include" the library to my cmake-project.
    What do I need to add to my cmake file?

    best regards

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 29 May 2024, 19:41 last edited by
      #2

      Hi and welcome to devnet,

      Did you take a look at the examples that comes with the repository ?

      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
      0
      • D Offline
        D Offline
        Dabrzn
        wrote on 30 May 2024, 14:07 last edited by Dabrzn
        #3

        Hi!
        According to the example I have added to my cmakefile:
        target_link_libraries(ads_test PRIVATE qt${QT_VERSION_MAJOR}advanceddocking).
        The cmakefile doesn't show a syntaxerror- but If I try to build it says: :-1: error: cannot find -lqt6advanceddocking.

        My main-confusion is: I have to include DockManager.h . The file DockManager.h is not available in the ads-build-folder. It is available in the "ads master folder", from where I build.
        Do I need both folders (build and the master folder from git)? I would expect -> no.
        -If no, how can QT find the DockManager.h file? Can QT find it somehow trough/in the libqtadvanceddocking.a -file or .o files in the build folder? How can I tell QT where to look for it? Do I need to add an environment variable? Which folder do I need to link?
        -If yes, how can I add the link to the include folder in the cmakefile? With include_directories or target_include_directories(thisproject PRIVATE headerdir)?

        thanks!

        P 1 Reply Last reply 30 May 2024, 14:45
        0
        • D Dabrzn
          30 May 2024, 14:07

          Hi!
          According to the example I have added to my cmakefile:
          target_link_libraries(ads_test PRIVATE qt${QT_VERSION_MAJOR}advanceddocking).
          The cmakefile doesn't show a syntaxerror- but If I try to build it says: :-1: error: cannot find -lqt6advanceddocking.

          My main-confusion is: I have to include DockManager.h . The file DockManager.h is not available in the ads-build-folder. It is available in the "ads master folder", from where I build.
          Do I need both folders (build and the master folder from git)? I would expect -> no.
          -If no, how can QT find the DockManager.h file? Can QT find it somehow trough/in the libqtadvanceddocking.a -file or .o files in the build folder? How can I tell QT where to look for it? Do I need to add an environment variable? Which folder do I need to link?
          -If yes, how can I add the link to the include folder in the cmakefile? With include_directories or target_include_directories(thisproject PRIVATE headerdir)?

          thanks!

          P Offline
          P Offline
          Pl45m4
          wrote on 30 May 2024, 14:45 last edited by Pl45m4
          #4

          @Dabrzn said in advanced docking system - how can I implement it to a project:

          My main-confusion is: I have to include DockManager.h . The file DockManager.h is not available in the ads-build-folder. It is available in the "ads master folder", from where I build.

          You need to link the lib first and set the include directory.
          In the example the include dir is set to CMAKE_CURRENT_SOURCE_DIR/../../src.
          If you look at the repo, in src there are all the headers you need.


          If debugging is the process of removing software bugs, then programming must be the process of putting them in.

          ~E. W. Dijkstra

          1 Reply Last reply
          2
          • D Offline
            D Offline
            Dabrzn
            wrote on 30 May 2024, 18:38 last edited by
            #5

            It is working:

            cmakefile:
            target_include_directories(ads_test PRIVATE C:/sandbox/qt_lib/Qt-Advanced-Docking-System-master/src)
            target_link_libraries(ads_test PUBLIC Qt${QT_VERSION_MAJOR}::Widgets C:/sandbox/qt_lib/build-ads-Desktop_Qt_6_7_1_MinGW_64_bit-Debug/lib/libqtadvanceddocking.a)

            mainwindow.h:
            #include <DockManager.h>

            In my case I need both: the build folder and the master folder(from git). Maybe there is a better way to implement that library...but for the beginning it is ok for me.

            P 1 Reply Last reply 30 May 2024, 19:30
            0
            • D Dabrzn has marked this topic as solved on 30 May 2024, 18:46
            • D Dabrzn
              30 May 2024, 18:38

              It is working:

              cmakefile:
              target_include_directories(ads_test PRIVATE C:/sandbox/qt_lib/Qt-Advanced-Docking-System-master/src)
              target_link_libraries(ads_test PUBLIC Qt${QT_VERSION_MAJOR}::Widgets C:/sandbox/qt_lib/build-ads-Desktop_Qt_6_7_1_MinGW_64_bit-Debug/lib/libqtadvanceddocking.a)

              mainwindow.h:
              #include <DockManager.h>

              In my case I need both: the build folder and the master folder(from git). Maybe there is a better way to implement that library...but for the beginning it is ok for me.

              P Offline
              P Offline
              Pl45m4
              wrote on 30 May 2024, 19:30 last edited by
              #6

              @Dabrzn said in advanced docking system - how can I implement it to a project:

              C:/sandbox/qt_lib/Qt-Advanced-Docking-System-master/

              C:/sandbox/qt_lib/build-ads-Desktop_Qt_6_7_1_MinGW_64_bit-Debug/lib/libqtadvanceddocking.a

              Absolute paths are not the cleanest solution, but for trying and testing it's ok :)

              Also, you are linking the library from the build directory... better install the lib to a different and persistent place on your computer and link it from there.

              See:

              • https://cmake.org/cmake/help/latest/command/install.html

              and:

              • https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX.html

              If debugging is the process of removing software bugs, then programming must be the process of putting them in.

              ~E. W. Dijkstra

              1 Reply Last reply
              1
              • D Offline
                D Offline
                Dabrzn
                wrote on 31 May 2024, 09:35 last edited by
                #7

                Thanks..that was the missing point.
                I set the PREFIX for the installation path, build and the run "mingw32-make install". That installed the header files and the lib files into my standard library folder.

                1 Reply Last reply
                0

                1/7

                29 May 2024, 12:18

                • Login

                • Login or register to search.
                1 out of 7
                • First post
                  1/7
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved