without having tried it out:
You can do that with a QTextEdit1) Is there any widget/ text edit, where I can set color of each char individually ?? Its just a thought to avoid using a highlighter.
You can modify the model. Adjust the data() and rowCount() methods to2) With the simple DOM Model, now I can set the syntax highlighter. Only thing is nodeValues are represented as child items in tree . How to avoid this ?
data(): include the text of the childNodes() that satisfy isText()
rowCount(): do not count child nodes that satisfy the condiftion of above
Alternative:
wrap the dom-model in another model that provides said difference.
Bookmarks