Setting foreground in a QTextCharFormat from a QPalette
It is possible to set a QTextCharFormat foreground from a QPalette?
setForeground() takes a [[Doc:QBrush]] as argument, [[Doc:QPalette]] returns brushes. So, yes, this works. You'll have to poke the brush out of the palette manually, though, there's no way to pass a QPalette to the text format directly.
I see, thanks.