Hi,
I wrote a small RegExp tool and I have the following problem:
The tool has two text fields - one where the user can type the regular expression (QPlainTextEdit), and another which contains a test text and on which the current regular expression is being executed (QTextEdit).
As the user is typing the expression, I want to highlight the matching text in the test text QTextEdit.
To achieve this I used QSyntaxHighlighter.
It all works nicely, except, that the QSyntaxHighlighter::highlightBlock() is called by the document when it was changed.
Since I am not changing the test text but the RegExp, the highlighting doesn't get triggered unless I change the test text.
My question is:
Does any one know if there is a way to force QTextEdit to emit textChanged() or any similar notification that will trigger the highlighting without subclassing QTextEdit?
Just out of curiosity.
Thanks.
Bookmarks