@SK
Did you use setColorGroup() for that?
I have a similar problem and I tried the same thig but it doesnt work for me, am not sure why.
If I use setColorGroup() with QPalette::Inactive, and specify each color role, then set that pallete to my widget, when it gets disabled it just uses its normal disabled colors...
My actual problem is that I want to get rid of a text shadow in the disabled mode...
If you could post your code regarding this I would really appreciate it!
//current color group is active (this is in the constructor)
p.
setColorGroup(QPalette::Disabled,p.
windowText(),p.
button(),p.
light(),p.
dark(),p.
mid(),p.
text(),p.
brightText(),p.
base(),p.
window());
setPalette(p);
//current color group is active (this is in the constructor)
QPalette p = this->palette();
p.setColorGroup(QPalette::Disabled,p.windowText(),p.button(),p.light(),p.dark(),p.mid(),p.text(),p.brightText(),p.base(),p.window());
setPalette(p);
To copy to clipboard, switch view to plain text mode
Thanks.
Bookmarks