Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Background Color from Stylesheet?
Qt_User72653 last edited by
Is it possible to get the background color of a widget that was set using a stylesheet; aside from storing a variable or parsing the stylesheet? I'm trying to get the color from the palette of the widget but it looks like it's returning the default background color (grey).
As far as i know, you cannot.
I assumed that i could get via the QStyleOption struct or
the palette() but none of my test gave the correct value.
I could have missed something though :)