> I think that's where you will need to use Roles, if you want different colors > for different types of tree elements (element, attibute, cdata, text, etc) > You'll set item.setData(color, colorRole, and the custom delegate will need to > extract the color role and draw the text in that color.
I don't think roles helps here, because if you look at how your browser displays the example page I linked in the previous email, there are MULTIPLE text colors used within a single model index. For example, if the text of an index was <title lang="en">Harry Potter</title> The strings "title", "lang", "en", and "Harry Potter" may each have a different color since they represent different things. Sean _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest