PDA

View Full Version : Changing ToolButton POPUP Menu orientations.



ankushbabrekar
16th February 2011, 13:34
I create a one QToolButton and adding some Menu Actions on it. I want Change the orientations of menu. Currently all menu items show me in veritcal manner. Please any one tell me how to changes its orientations into Horizontal manners.




QToolButton* toolBut = new QToolButton;
QMenu* toolMenu = new QMenu( toolBut );
toolMenu->addAction(action1);
toolMenu->addAction(action2);
toolMenu->addAction(action3);
toolBut->setMenu(toolMenu);


I want to implement like this way.
_________ _______ ______________
|TOOLBTN | ACT1 | ACT2 |ACT3 |
|_________|______________________|
|TOOLBTN1|
|_________|
|TOOLBTN2|
|_________|

high_flyer
16th February 2011, 15:34
AFAIK, and based on what I see in the doc, actions are only represented vertically.
You will have to subclass, and implement the horizontal representation your self.