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. DockWidget and Dock area NO central Widget..
Qt 6.11 is out! See what's new in the release blog

DockWidget and Dock area NO central Widget..

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 4 Posters 1.9k Views 2 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.
  • V Offline
    V Offline
    vicky12
    wrote on last edited by vicky12
    #1

    alt text
    https://imgur.com/a/TLDCI
    How can I achieve this? i want to use dock widget and area. so that my widget is movable and by area doesn't resize.

    A 1 Reply Last reply
    1
    • V vicky12

      alt text
      https://imgur.com/a/TLDCI
      How can I achieve this? i want to use dock widget and area. so that my widget is movable and by area doesn't resize.

      A Offline
      A Offline
      ambershark
      wrote on last edited by
      #2

      @vicky12 I would just force the size of your dock widgets to always cover the area where the central widget would be. So after a resize() event just resize your dock widgets to fill the area.

      This is a weird and non-standard way to do a gui though, not quite sure why you would want this.

      You could also not use a QMainWindow and just make a QWidget with the 3 movable widgets inside it be the "main window". Then there is no central widget. If you wanted the other features of mainwindow, you can also make custom movable widgets that can be dragged and dropped to relocate inside a single QWidget that would be your central widget.

      My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

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

        Hi,

        One thing is not clear from your design: are you going to undock these widgets ? If not, then QSplitter seems to be a better fit.

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

        V 1 Reply Last reply
        2
        • SGaistS SGaist

          Hi,

          One thing is not clear from your design: are you going to undock these widgets ? If not, then QSplitter seems to be a better fit.

          V Offline
          V Offline
          vicky12
          wrote on last edited by
          #4

          @SGaist yes i will be undocking it.

          1 Reply Last reply
          0
          • VRoninV Offline
            VRoninV Offline
            VRonin
            wrote on last edited by
            #5

            I looked at a similar thing for a while actually, Implementing it mixing QMdiArea and QDockArea is a mess. There are commercial products for it but couldn't find a viable solution

            "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
            ~Napoleon Bonaparte

            On a crusade to banish setIndexWidget() from the holy land of Qt

            1 Reply Last reply
            1

            • Login

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