PDA

View Full Version : Problem while using setItemWidget in QTreeWidget.



merry
19th February 2014, 10:31
Hi,

To use rich text in QTreeWidget i used setItemWidget to insert QLabel but items disappears after scrolling up and down.

10051

I even tried to use QTextDocument and QTextEdit instead of QLabel but same problem persists.

anda_skoa
19th February 2014, 12:27
You might have to go for an item delegate, so you can customize painting of the cell in that particular column.
QTextDocument can render the text for you, but the delegate needs to set up the painter, etc.

Cheers,
_