[QScintilla] How to do AutoCompletion? Is there an example?
Timo Rothenpieler
BORNtobeNAMELESS at online.de
Mon Mar 12 14:17:32 GMT 2007
Hi.
I'm using QScintilla with Qt4 in C++ and would like to implement
Auto-Completion in the IDE I'm writing.
But i could not find out how to use QsciAPIs to get a working
Auto-Completion.
At the moment I'm trying it like this:
----------
QsciScintilla* sci = new QsciScintilla(this);
sci->setPaper(QColor(1,81,107));
sci->setMarginLineNumbers(1,true);
sci->setFolding(QsciScintilla::CircledTreeFoldStyle);
sci->setAutoIndent(true);
sci->setAutoCompletionThreshold(2);
sci->setAutoCompletionSource(QsciScintilla::AcsAPIs);
QsciLexerBMax lex(sci);
QsciAPIs apis(&lex);
apis.add("test");
apis.add("test123");
apis.add("foobar");
apis.prepare();
lex.setAPIs(&apis);
sci->setLexer(&lex);
----------
But it does not work.
Is there an existing example how to use this, or can somebody give me an
example?
--
Erstellt mit Operas revolutionärem E-Mail-Modul: http://www.opera.com/mail/
More information about the QScintilla
mailing list