One other option is that you could use QMainWindow functions
QMainWindow::saveState()
QMainWindow::removeDockWidget() // remove all
...// Now central widget uses all the space
QMainWindow::addDockWidget() // Add them back
QMainWindow::restoreState()
Bookmarks