PDA

View Full Version : Highlighting individual words of a sentence



kellorooney
16th April 2010, 01:59
I am trying to highlight individual words of a sentence as my program goes through a list of strings. I am not sure if I would use QPalette or QSyntaxHighlight. Can someone tell me the difference? I think I would use the QPalette, but I'm not sure how to incorporate this example: const QBrush & QPalette::highlightedText () const

Thanks!

wysota
16th April 2010, 04:51
QPalette is not a method for using colours, it is a method of defining colours. In this case highlightedText() says what colour the highlighted text will be but it doesn't define what text gets highlighted.