I have a couple of QDockWidgets arranged in a single QMainWindow. The problems I'm seeing are thus:

1. When I add a QDockWidget to the right with no central widget set it automatically resize itself and takes all the available space. I want it to take only some percentage of the window and no more. Unfortunately QDockWidget ignore size hints set on its contained widget (which includes a few buttons arranged in a QVBoxLayout).

2. When I add another QDockWidget, the available space is distributed evenly between them. One of them, though, is horizontal in nature and doesn't need all that space. I'm trying to tell QMainWindow to expand only the other QDockWidget, but I don't know exactly how.

Thanks