Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.8.5, 5.2.0
-
Windows 7
-
b152b425f74788b2f2845fb7d1a5032d86b8746d (dev, 22.1.2014, 5.3) 40db54f8182e427f76c663aec15c3a6a682b3c9f (4.8.6, 23.1.2014)
Description
QMenu items action text is staying default black when changing it by stylesheet. Shortcut text color is still changed.
main.cpp
#include <QApplication> #include <QMenu> #include <QCursor> class Widget : public QWidget { void mousePressEvent( QMouseEvent * event ) { QMenu *menu = new QMenu(); menu->setStyleSheet("QMenu{color: red;}"); menu->addAction("Cut",0,0,QKeySequence::Cut); menu->addAction("Copy",0,0,QKeySequence::Copy); menu->addAction("Paste",0,0,QKeySequence::Paste); menu->exec(QCursor::pos()); } }; int main(int argc, char *argv[]) { QApplication a(argc, argv); Widget w; w.show(); return a.exec(); }
All text color was changed correctly on Mac OS