[Qt-interest] Generic highlighter

NoRulez norulez at me.com
Fri Nov 12 17:39:17 CET 2010


It must be very very difficult for the Qt guys to implement such simple
class QGenericHighlighter...

I don't see the reason why all the users/developers which want better
highlighting support must use the antiquated QSyntaxHighlighter or to pick
out all the necessary files from the generic highlighter.

So, if each implement everything from scratch, for what it takes then Qt or
some other framework?

I read many posts on how to implement Python, Perl, ... syntax highlighting
with QSyntaxHighlighter, I think with the born generic highlighter it is the
best point to use it instead or as an addition to the QSyntaxHighlighter.

Best Regards
NoRulez

-----Ursprüngliche Nachricht-----
Von: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] Im Auftrag von Sean Harmer
Gesendet: Freitag, 12. November 2010 16:01
An: qt-interest at trolltech.com
Betreff: Re: [Qt-interest] Generic highlighter

Hi,

On Friday 12 November 2010 14:16:58 NoRulez wrote:
> But this is not the answer of my question.
> 
> The implementation is too deep in the qt creators source, but maybe
anybody
> has it already extracted?

I do not know of any stand-alone implementation of this. Having said that,
the 
implementation in the qt-creator source does not appear to be particularly 
tightly coupled to QtCreator at all.

The generic syntax highlighter stuff is all in one dir, namely:

qt-creator/src/plugins/texteditor/generichighlighter

The Highlighter class here simply inherits from
TextEditor::SyntaxHighlighter 
which is in the parent directory. At a quick glance this seems to just
operate 
on QTextDocument. So it looks to be fairly simple to extract it.

If you get it to work I am sure that others would also be interested.

Good luck,

Sean
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest





More information about the Qt-interest-old mailing list