How to add combobox into menubar
-
Hi
I have desktop application and i also want to add combox into menubar for search items pleace anyone have solution pleace help me to solve that problem.Short idea ->Add combobox into menubar for implement serch item(items are fixed)
thanks
Diluka -
Hi,
you can use QMenuBar::addAction with QWidgetAction.
Good Luck
-
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); -
Hi
Thanks all of you,But any body can tell me if there any steps to do that use in QT Designer because i am use in VS 2008 .I try several ways but still not achieved that.(I use in QT Designer in VS 2008 for develop my application)Thanks
-
Hi,
at the moment you can't do this at design mode (QtDesigner) but I think you have to write code. -
Hi
Thanks for reply .