You are not logged in.

1

Wednesday, March 21st 2012, 12:36am

colors in QComboBox

Hi,

is there a possibility to set a specific color (background or text color) for each given item in a QComboBox?

I also searched for a way to remove the check from a checked item, but I didn't find anything.

It would great if you could help me. Thanks!

2

Thursday, March 22nd 2012, 2:34pm

Hi,
I am not sure if this helps but perhaps you can use the
alternatingRowColors : bool
property of QAbstractItemView - if alternating is what you want to do.

I think (I may be wrong) you might have to think more in terms of "change the model" than "change the display". I, myself, have yet to really understand the "delegate" thing, but this helped me once in a similar thing. Sorry to be so unprecise, this is the best I can do.
SeDi