I have a pyqt4 app which should run with arbitrary colorscheme. I would like to make some widgets more visible by making them lighter or darker than their style-predefined color. I would like it to work for any overall style and don’t want to hardcode colors in there. What would be the way to call QWidget.setStyleSheet which would make that happen?
I have a pyqt4 app which should run with arbitrary colorscheme. I would like
Share
I’m not sure this is possible. There is no default stylesheet to query and parse, because its a user-specified value.
Themes can be platform-dependent, so would have to do a bunch of processing on the widgets style -> palette -> attributes, figure out the color values, and generate a modified value to specify in your stylesheet. At that point, you are better off just sticking with the palettes and modifying their values, and not worrying about a stylesheet.