I have a QMainWindow that has a central widget. There are a bunch of dockwidgets in the main window also. I'd like to maximize the size of the central widget within the window, and minimize the sizes of the dockwidgets (same as manually moving the size rectangle around the central widget.

When I try and set the size of the central widget to maximum it doesn't make the dockwidgets go to their minimum size. Should I be doing the reverse - set each of the dockwidgets to their minimum sizes?