I'm trying to set different text colors for my QActions
inside a QMenu
.
For example
File -> Open
-> Save
And I want to have Open written in red and Save in blue. I tried modifying the style of the File menu but this doesn't work, all the QActions of the given menu will end up having the color specified for the last QAction.
Is there any simple way of doing it that I'm missing here ?
EDIT: The solution suggested here doesn't work for me. Since I'm populating my QMenu with for loop, the last iteration will set a stylesheet to the menu and all the QActions will have this stylesheet. I guess it overwrites the stylesheets set previously.