Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
-
None
Description
QSyntaxHighlighter isn't interruptable internally. It always runs through ALL lines on the first call which is triggered by the modification of the QTextDocument (that is internally directly connected to the private class). This blocks the ui for user interaction.
I'd suggest to add a way to pause and resume the highlighting process in QSyntaxHighlighterPrivate::reformatBlocks(..). Maybe a block counter or a special QTextBlock::userState() can be used to interrupt it.
Discussion: https://forum.qt.io/topic/101077/qsyntaxhighlighter-hardly-threadable