I'm wondering how to get the text color of a specific QLabel
. I'm setting text color earlier in my code an need to read it out again later to determine which action to take...
I think you can use:
QLabel::palette()
To get the palette of this widget. Once you have the palette I guess you could retrieve the color via:
ColorRole r = QPalette::Text;
const QBrush & QPalette::brush(r);
Once you have the QBrush you can simply use:
const QColor & QBrush::color() const
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With