Using main menu as toolbar in Qt
I'd like to create a toolbar that contains main menu, just like the standard main menu at the top of the window.
Is there some fast way to do this in QT ? I know that I can create a toolbar with buttons and context menus :-)
开发者_开发知识库Thx for help.
You can add any widget to QToolBar using:
QMenuBar *mb = new QMenuBar();
QToolBar::addWidget(mb);
It might be easier to reparent designer's ui->menubar to toolbar.
精彩评论