C:\Qt\4.3.3\examples\richtext\syntaxhighlighter\release
Ваш случай по моему
хайлайтер используется вместе с QTextEdit
The QSyntaxHighlighter class is a base class for implementing QTextEdit syntax highlighters. A syntax highligher automatically highlights parts of the text in a QTextEdit, or more generally in a QTextDocument. Syntax highlighters are often used when the user is entering text in a specific format (for example source code) and help the user to read the text and identify syntax errors.
а в топике идет речь о QLineEdit.