Multicolored text for tree/table/list items?
What is the fastest way to make the text of a tree item multicolored?
Like this: <black>Text</black><red>123</red>
I did some googling and found QStyledItemDelegate?
I don't see how to set the colors for regions though.
Do the items support html?
By default: no. I have some code lying around that can do it, but it is not ready to be released. Vote for the associated "bug report":https://bugreports.qt.nokia.com/browse/QTBUG-14200 please.
Nuts. That would have been great to have.
If it become important, I think I can put a solution together using a QStyledItemDelegate.
I went to vote, but I guess they use different credentials so I have to create an account.
The following "FAQ ":http://developer.qt.nokia.com/faq/answer/how_can_i_modify_the_color_for_individual_words_for_items_in_a_view provides an example that illustrates how this can be done by reimplementing "QItemDelegate::paint":http://doc.qt.nokia.com/latest/qitemdelegate.html.
I don't think the solution presented in that FAQ is very usable. Nice if you want to render one fixed word in a fixed color, but it does nothing to support rendering actual rich text in an item view.