> For bonus points, I'd love to modify the text colors for syntax highlighting > tag > names vs. attribute names vs. attribute values, etc. I don't know if how easy > it > is to have multiple colors in a single QModelIndex? A quick search says I > might > need to use a delegate for that.
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. _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest