QMainWindow::AllowNestedDocks might do what you need.

Mind, however, that the main window layout is not a grid layout, with all pros and cons.