Your menubar is related to your QMainWindow widget, right ?

What if you add it like this :

Qt Code:
  1. mainwindow->setMenuBar(mMenuBar);
To copy to clipboard, switch view to plain text mode 

Or maybe, I misunderstood your issue...