How to set buttons in popup mode
-
hi..i want to create a button ..which have the property when i clicked on that button it should have to show some set of buttons down to that button..like toolbutton with menu options...some one please help me
-
You might have a look at "contectmenuevent":http://doc.qt.nokia.com/4.8-snapshot/qwidget.html#contextMenuEvent
-
it is also looks like tool button popup mode ....what is the difference betwwen the two methods
-
Just create a QMenu, and use setMenu on the QPushButton.
-
i already created that thing... but what iam trying to do is grouping of buttons when i clicked on the parent button then all child buttons should dropdown ....
-
Huh? That's a weird requirement. You really mean that you have a set of buttons that show a menu, and when you click one of them, they all -thow- show their menu's?
-
yes that one only
-
Yes, or no?
Yes, they all need to show their menu, or
no, only the one clicked needs to show a menu?
Which one is it?
-
no....
-
So... what's the problem with just setting a QMenu on the button then?