View Full Version : How to create this button
sonulohani
16th May 2013, 06:27
9040
How to create this type of button after clicking which shows the custom menu like this:-
9041
First you should create a tool button, then add QMenu to it. That simple :D
QMenu *menu = new QMenu (this->ui.toolButton);
// see overloads
menu->addAction ("Hello");
menu->addAction ("There");
this->ui.toolButton->setMenu (menu);
// that mode enables drop-down arrow, you can also try another modes
this->ui.toolButton->setPopupMode (QToolButton::MenuButtonPopup);
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.