How to get QSyntaxhighlighter's format outside?
-
wrote on 13 Jun 2015, 06:26 last edited by kkkiio
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 ?
1/2