This is a demo of a syntax highlighter done in C++/Qt. The code is extraeamly non optimized, but it does work most of the time. The class is very slow, so please don’t use it on large files.

The syntax highlighter definitions are the same ones used by the gtksourceview library for gtk. The difinitions are passed to a class which does the highligting. This means that the engine is not aware of what he is coloring, and adding new languages is as trivial as adding new XML to the langs directory.

See also qsveditorbeta for more information about the editor control to be released in the future.

Share Button

משתמש לינוקס ממוצע, בערך