First of all you don't have to create a menu bar yourself. If you call QMainWindow::menuBar() a menu bar will be created and setup for you. There is a chance this will already fix your problem.