First you should create a tool button, then add QMenu to it. That simple 
// 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);
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);
To copy to clipboard, switch view to plain text mode
Bookmarks