views:

312

answers:

1

Can somebody tell me where in Qt gui can I use HTML? Which widgets do support HTML?

Or more specific: why HTML doesn't work in QTreeWidgetItem and QTreeListItem?

I'm trying to make some of the text in QTreeWidgetItem italic or different colour and I can't do it with HTML, it is not interpreted at all, I just see HTML code in tree items.

In QLabel HTML works fine...

I did some research and documentation: http://qt.nokia.com/doc/4.5/richtext-html-subset.html says that QTreeWidgetItem should support that too...

A: 

OK, after some research I've found a way to see HTML in items-widgets - you have to add custom delegate to it (and handle the HTML in that delegate).

Found it in "Rapid GUI Programming with Python and Qt" book :-)

grucha