How to add combobox into menubar
-
-
Create search items as QAction and set them in QMenubar. After that, you can set true or false the Checkable property of QAction .
-
As mcosta has already said, you can use QWidgetAction.
for example:-
QComboBox *comboBox = new QComboBox(menu);
QWidgetAction *checkableAction = new QWidgetAction(menu);
checkableAction->setDefaultWidget(comboBox);
menu->addAction(checkableAction);