Calling setupUi() second time should not cause any problem.I have discovered that the problem is due to a "double call" to ui_->setupUi(this);
To remove all the action from menu bar useI would need a function to disconnect all the actions of the menu (like a ui_->undoSetupUi(this) )
1. QMenuBar::clear();
or
2. QMainWindow::setMenuBar(new QMenuBar());
Bookmarks