I\'m using in a project a QSyntaxHighlighter with some unit tests on my class, in which I manually set text and check the formats by using:
QSyntaxHighlighter