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);


    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.


  • You can style it using the ::menu-indicator subcontrol in a style sheet.

    See the linked example under QToolButton and also QPushButton

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.