Unsolved QLabel text color
-
how can i change QLabel / QtextViewer text color in its PaintEvent() ?
-
-
Hi,
Why are you re-implementing the
paintEvent
of 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!
-
You can change the color with stylesheet on runtime too
-
In that case why not make a custom style ?
-
@Pl45m4
I know that. i dont want to use stylesheet for other reasons -
-
I asked for a way to do it within painEvent() ! i can not use any other way!!
-
@mahd96
Then there is an accepted answer at https://stackoverflow.com/a/2756376/, which recommends using stylesheet but shows possibly usingsetPalette()
, though warns it may not come out right, you'll have to try....