Change trinagle in the menu button
When the popup menu is associateed with push button in some styles we can see will produce a small triangle to the right of the button’s text. How we can change this triangle?
You could try creating a QProxyStyle and reimplementing QStyle::standardItemImplementation() to return whatever you need when the SP_ArrowDown pixmap is requested. However, I am not sure that this is actually used by all styles, nor that this is the right pixmap. YMMV
I have a similar problem.
You need to replace the standard icon, on the other
I created a new class inherited from QProxyStyle and redefined method standardIconImplementation, but for some reason I will not have changed…
and the implementation itself
- QIcon CustomStyle::standardIconImplementation(StandardPixmap standardIcon,
- const QWidget *widget) const
- case QStyle::SP_TitleBarMenuButton:
- case QStyle::SP_ArrowDown:
- case QStyle::SP_CommandLink:
- return QProxyStyle::standardIconImplementation(standardIcon, option, widget);
Yes it is connected and is the default style
- #include "customstyle.h"
- #include "widget.h"
- int main(int argc, char *argv)
- QApplication a(argc, argv);
- a.setStyle(new CustomStyle());
- Widget w; w.show();
- return a.exec();