Don't want small triangle in QToolButton::setMenu(QMenu *)
-
Hi,
The following is my code:
//////////////////////////////////
QMenu *menu = new QMenu();
QAction *testAction = new QAction("test menu item", this);
menu->addAction(testAction);toolButton->setMenu(menu);
toolButton->setPopupMode(QToolButton::InstantPopup);
/////////////////////////////////////I don't like on the right bottom of the tool button, there is a small triangle there.
Is there any way that I can get rid of this small triangle, i.e., the tool button looks the same as normal ones, but when you click on it, it has a pop-up menu.Any help is appreciated.
Chao
-
You can style it using the ::menu-indicator subcontrol in a style sheet.
See the linked example under QToolButton and also QPushButton
http://qt-project.org/doc/qt-5.0/qtwidgets/stylesheet-reference.html