QComboBox + QSS + setting text color [Solved]
-
Hi! Surely an easy question here...
I'm changing the text color of a QComboBox using a style sheet from black to white. The problem I'm facing is that, when the QComboBox contents drop down, the (white) text can't be read due to the also white background.
So... how can I change the text color of current AND any other option of the QComboBox? Or, conversely, how can I change the background color only when the QComboBox is "on" (drop-down'd)?
EDIT: for example: Normally, the QComboBox has white text, grey background. When drop-down'd, it has white text and white background. I would like it to have black text and white background when drop-down'd. Also could do great with white text and grey background.
Thanks a million!
--
-
Back here again, ready to tag the post as SOLVED!
This piece of QSS sets the text's color to black, while the background remains white.
@QComboBox QListView {
color: black;
/*alternate-background-color: green;
}@(thanks, Andre!!)
--