PDA

View Full Version : How do you set a part of the text in bold in a QListWidgetItem ?



ouekah
21st May 2010, 13:37
Hi,

I would like some specific parts of my QListWidgetItems to be in bold.

Could anyone provide me with a simple example ?

aamer4yu
21st May 2010, 13:41
You will need to use delegates and draw the text yourself.
See QItemDelegate::drawDisplay

Also you can use QSyntaxHighlighter to draw colored text for specific parts.

ouekah
21st May 2010, 14:32
OK but how do I link the delegate with the highlighter ?