Relative Content

Tag Archive for c++qtc++20qt6

How do I stretch a QDockWidget’s child to the full size of the dock widget?

In the following minimum example, I have a main window with a dock widget with a child widget. I would like the child widget to take up the entire docked widget even as the docked widget resizes, but I’m not sure how to do that. I would think this is the default behavior with the dock widget providing “dockable” behavior, but otherwise yielding its drawing surface to the child entirely. I have set the child widget’s size policy to Expanding, but that doesn’t seem to be effective.