[QScintilla] Lexer does not work for me
wichern
wichern at tzi.de
Mon Nov 26 11:12:28 GMT 2012
Hi everyone,
Im using the current 2.6.2 version of QScintilla with Qt 4.8.2 and try
to get an editor with a C++ lexer:
FcScintillaEditorWidget::FcScintillaEditorWidget(QWidget* a_parent_ptr)
: QsciScintilla(a_parent_ptr)
{
QFont l_font;
l_font.setFamily("Consolas");
l_font.setFixedPitch(true);
l_font.setPointSize(10);
QsciLexerCPP* l_lexer_ptr = new QsciLexerCPP(this);
l_lexer_ptr->setDefaultFont(l_font);
this->setLexer(l_lexer_ptr);
this->setText("// Hello World \n\nint main() { return 0; }");
}
It does display the text with the given lexer font, but there is
absolutely no colourization.
The complete text is in the QsciLexerCPP::Default colour.
I tried the python lexer too, but with the same result.
What am I doing wrong?
thanks
Paul
More information about the QScintilla
mailing list