Do you want the dock widget to stay the same size all the time, meaning it is not resizable, even when QMainWindow is not maximized ? If so, then you can set the QSizePolicy::Fixed for height, and that dock window will not change size, ever.

If you still want it to be able to be resized, but have only the top window expand, while the bottom one stays the same, then i think you want to set the QSizePolicy::Minimum

You can learn more about the QSizePolicy and how they affect widgets here