On Thu, Aug 20, 2020 at 8:21 PM Kåre Särs wrote:
> So the thing is that the text document does not get notified that it needs a
> redraw... how is just adding a 'onDefinitionNameChanged: textArea.append("")'
> I tried it and it works, but is that too ugly?
thanks for your response. It was an inspiring suggestion:
OK I was looking for something that the library does for all
consumers. So I looked into QTextDocument but I found nothing that
looked suitable for a forced redraw.
So I remembered: My code does nothing with the document but passing it
to SyntaxHighlighter on creation. That lead me to the (brute force)
solution: Every time a new definition or theme is set, the highlighter
is destroyed and a new one is created . Maybe ugly from performance
point of view but works fine.