Open dridk opened 5 years ago
@dridk I do not think that you can get those values from the qpalette. If you need to access the palette programmatically you can use
https://github.com/ColinDuquesnoy/QDarkStyleSheet/blob/master/qdarkstyle/palette.py
from qdarkstyle.palette import DarkPalette
Hi, Thanks for your reply . I just swtiched to qtmodern . I think you must follow the same pattern. They first set a QPalette from Python and secondly access colors from qss file using the "palette" keyword .
QGroupBox {
background-color: palette(alternate-base);
border: 1px solid palette(midlight);
margin-top: 25px;
}
https://github.com/gmarull/qtmodern/blob/master/qtmodern/resources/style.qss
So now, I can be agnostic from the style and get color from QPalette.
Thanks for pointing to th-at . resource. Thoughts @dpizetta
I'll take a look. Tks
Information about your current environment setup:
Qt bindings available:
Description / Steps to Reproduce
I cannot access palette color of the current style. For example, if I try to access the text color supposed to be light, I get only the dark color from standard light theme.