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. How to change position of dock widget

How to change position of dock widget

Scheduled Pinned Locked Moved General and Desktop
8 Posts 3 Posters 4.5k Views 1 Watching
  • 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.
  • T Offline
    T Offline
    Tabi
    wrote on last edited by
    #1

    Please refer "this":http://stackoverflow.com/questions/18871717/how-to-set-dock-widget-below-widget

    I tried through geometry and digged the doc of mainwindow and dock widget but unable to do so. Please help.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Have a look at "Qt::DockWidgetArea":http://qt-project.org/doc/qt-4.8/qt.html#DockWidgetArea-enum to see where you can put your dock widgets.

      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
      0
      • T Offline
        T Offline
        Tabi
        wrote on last edited by
        #3

        Hi SGalst,
        Thanks for link. I have seen it before and it is not exactly what I wanted. Please refer link to see the image. I wanted to give a gap between dock and mainwindow toolbar.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          If I understand you correctly, you want your dock between two other widgets ?

          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
          • T Offline
            T Offline
            Tabi
            wrote on last edited by
            #5

            Yes exactly. I found a bad way to do this which costs me to lost dockable features if I place the dock into a widget then it is allowing me to place that widget anywhere. But I want to use dock directly I mean without lossing any feature.

            1 Reply Last reply
            0
            • raven-worxR Offline
              raven-worxR Offline
              raven-worx
              Moderators
              wrote on last edited by
              #6

              -you can try to use stylesheets and set a padding on the QDockWidget.- nvm

              --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
              If you have a question please use the forum so others can benefit from the solution in the future

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                The only way I see so far (I'm not saying that its good or that it will work) would to put all your widgets in docks and remove the features of the "non dock" widgets. You should then be able to stack them one on top of each other.

                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
                • T Offline
                  T Offline
                  Tabi
                  wrote on last edited by
                  #8

                  @SGalst Oh yeah that I can try. Thanks!

                  1 Reply Last reply
                  0

                  • Login

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