Hello
I would like to set the text (foreground) color of an QAction on a QMenu.
I don't find out how that works.
Best Regards
Stefan
Printable View
Hello
I would like to set the text (foreground) color of an QAction on a QMenu.
I don't find out how that works.
Best Regards
Stefan
One possible way. The idea below is to use a widget as a menu item, so that the text property can be customized.
Code:
label->setStyleSheet("color: red"); newAct->setDefaultWidget(label); newAct->setStatusTip(tr("Create a new file")); connect(newAct, SIGNAL(triggered()), this, SLOT(newFile()));