PDA

View Full Version : How to preserve item's icon color ?



AlexSudnik
27th April 2011, 23:10
Hey everyone.

Following the QPalette property explanation :

As long as no special palette has been set, this is either a special palette for the widget class, the parent's palette or (if this widget is a top level widget), the default application palette.

So here's the problem: once a table's item is selected, it's icon color is multiplied by some color anyway! I mean, no matter what color roles i've changed in it's palette, i wasn't able to get rid of the grey color...Maybe i'm doing something initially wrong and there is another way to preserve icon's color withough palette adjustment? If anyone has any experience with something similiar...please share:)

Thanks!

http://img132.imageshack.us/img132/7527/75625394.th.png (http://img132.imageshack.us/i/75625394.png/)

high_flyer
29th April 2011, 10:43
By selecting the item the QIcon changes mode to 'selected' as well, which is changing its appearance.
Read the QIcon docs on how to change that behavior to fit your needs.

AlexSudnik
29th April 2011, 22:58
Thanks for the reference ,but i think my probles has something to do with the application's palette instead of icon modes.I mean , i do construct proper pixmaps according to the modes but there is still this blue color on top of it...