How to get QSyntaxhighlighter's format outside?
-
I use QSyntaxHighlighter's subclass to highlight text, but when i use
QTextFormat format = cursorForPosition(event->pos()).charFormat()
inQPlainTextEdit::mousePressEvent
, the format always is default.
So I search for a way to get the format which apply in highlighter.(QSyntaxHighlighter::format
is protected...)
help!!! -
Hi and welcome to devnet,
Out of curiosity, why do you need that information like that ?