Hello everyone !

I found already a lot of answers on this forum, but I'm stuck on this issue :

I'm trying to implement a sort of text "minimap" as we can find in Kate or Sublime Text (more the latter) .

From a single QTextDocument, I display it in a QTextEdit (editor) and also in a QTextBrowser (minimap) . The minimap uses QGraphicsView and QGrapicsProxyWidget to be seen scaled down. It works fine.

Now, I want to apply a different highlighting to each of the views. I read everywhere that I can't use two QSyntaxHighlighter in the same QTextDocument. Fine, having already use this class, I understand the limitation. Yet, I don't want to clone the QTextDocument each time there is an update, only for it to support it's own highlighter. It would be resource hungry with large texts.

Does anyone have an idea ? Maybe a workaround or a different approach ? I'd like to read your input

Thank you for your time and "Vive Qt !"