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. MainWindow or QDockWidget not resizing after undocking another QDockWidget .
Qt 6.11 is out! See what's new in the release blog

MainWindow or QDockWidget not resizing after undocking another QDockWidget .

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 814 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.
  • DiracsbracketD Offline
    DiracsbracketD Offline
    Diracsbracket
    wrote on last edited by Diracsbracket
    #1

    Hi,
    I have a QMainWindow app which contains a QDockWidget at the top, and one at the bottom.

    When the dock at the top is undocked, a few widgets in the centralWidget are made visible. These widgets are made invisible again when the top-dock is docked again.

    The problem is that when undocking the top dock, the centralWidget correctly expands to show the newly visible widgets and moves up to correctly align with the top of the MainWindow.

    The bottom dock however, is not resized correctly: it aligns with the bottom of the centralWidget, but its height is not increased to fill up all the space at the bottom, leaving a large space between it and the status bar of the MainWindow. The docks have a minimum size, but no maximum size, and both are expanding correctly as the MainWindow is expanded.

    Note that the bottom dock will immediately resize to the full size as soon as I grab its resize corner, or the resize corner of the MainWindow.

    I tried using adjustSize() on the bottom dock when the upper dock is undocked, but this has no effect.

    How can I achieve this?

    Thanks!

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

      Hi,

      Can you share the code you are currently using for that ?

      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

      • Login

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