Not possible with QMainWindow, you will have write a custom QWidget with layouts