PDA

View Full Version : QTreeView Custom column with an icon, and 2 lines of text



mromanuk
2nd July 2010, 22:22
Hi guys, What do you think would be the best way to go from a standard QTreeView widget like the first on the image to the second one?

http://www.dattabank.com/pub/style.PNG

I was thinking of embedding a TextBrowser or a rich text control, in each cell with a QStyledItemDelegate.

The model is really simple, just plain directories or files. :)

Lykurg
2nd July 2010, 22:43
Just write your own delegate and paint the icon and the two text lines. A text browser for that would be a pure overkill!

mromanuk
5th July 2010, 18:37
You are right, i'm going that way, I didn't know how simple it was.