QLabel text color
how can i change QLabel / QtextViewer text color in its PaintEvent() ?
Pl45m4 last edited by Pl45m4
You can use stylesheet
Why are you re-implementing the
paintEventof these widgets ?
@SGaist I dont want to use stylesheet for some reasons.
with paintEvent i can have runtime Theme Changing for my app.
i know i could use QPallete but for "Theme" i should do some signal/Slot that i am avoiding!
Pl45m4 last edited by
You can change the color with stylesheet on runtime too
In that case why not make a custom style ?
I know that. i dont want to use stylesheet for other reasons
JonB last edited by
I asked for a way to do it within painEvent() ! i can not use any other way!!
JonB last edited by JonB
Then there is an accepted answer at https://stackoverflow.com/a/2756376/, which recommends using stylesheet but shows possibly using
setPalette(), though warns it may not come out right, you'll have to try....