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 in Central Widget
Qt 6.11 is out! See what's new in the release blog

DockWidget in Central Widget

Scheduled Pinned Locked Moved General and Desktop
4 Posts 4 Posters 1.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.
  • M Offline
    M Offline
    moritzh
    wrote on last edited by
    #1

    Hello,

    is it possible to make the central widget to a docking area for dockwidgets?

    At the moment my central widget of the main window is completely filled with a Open GL Widget for 3D Graphics and around this i have multible DockWidgets with tools, settings, etc.
    Now I want the OpenGL Widget placed in a DockWidget instead of the central widget so can can drag it around, undock it from the main window, place it in the DockAreas around or place a other DockWidget from outside in the center.

    Visual Studio has a similar GUI, there is the texteditor in the center and I can undock the editor from the center and place it anywhere else and drag the setting dockwidgets from the side in the center.

    Is this possible with Qt?

    Moritz

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

      no the central widget is not draggable in a QMainWindow.
      The only thing you can do is nesting QMainWindows. But this won't probably do what you want it to do, since there will always be a fixed central widget.

      --- 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
      • A Offline
        A Offline
        andre
        wrote on last edited by
        #3

        It is possible with Qt, but standard Qt components don't offer this functionality. You'll either have to find a component that does (perhaps a 3rd party component?), patch Qt to suit your needs, or write a component yourself that does this.

        1 Reply Last reply
        0
        • G Offline
          G Offline
          GrahamL
          wrote on last edited by
          #4

          Hi
          I had a similar requirement and solved it by setting the central widget to 0 and then added the dock widgets

          hth

          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