PDA

View Full Version : Editable Tree Model Example and a QTreeView using icons



xael
21st April 2010, 09:32
Hi,
I'm using Qt 4.6 and I've inherited some classes (TreeItem TreeModel) declared in:
http://doc.trolltech.com/4.6/itemviews-editabletreemodel.html

The question is: how can I visualize icons using a QTreeView and the model described above?
Thanks in advance!

xael

aamer4yu
21st April 2010, 10:51
Return icon for Qt:: DecorationRole from the model's data function.

xael
21st April 2010, 11:37
Thanks for your answer ! I solved the problem and I made a step forward in understanding the Qt implementation of the MVC pattern

xael