2

I am currently using QScintilla to develop my own code editor. QScintilla provide autocompletion and calltips feature already. What I want is to get rid of the autocompletion popup widget , retrieve the list it gets, parse and display them with my own widget. So here is what I've got:

//disable the autocompletion feature:
QsciScintilla::setAutoCompletionSource( QsciScintilla::AcsNone);

//use this function call to get the list from api class:
void updateAutoCompletionList (const QStringList &context, QStringList &list)

The problem is ,the updateAutoCompletionList only give me the result from QsciScintilla::AcsAPIs, I have no way to get the result from QsciScintilla::AcsDocument.

Is there any way I could get result from QsciScintilla::AcsDocument?

thanks beforehand.

Pavel Strakhov
  • 39,123
  • 5
  • 88
  • 127
miguel
  • 159
  • 2
  • 9

1 Answers1

0

I've solved it myself.

No available API for me to do so, so I read the source code of QsciScintilla class, which has a method called "startAutoCompletion", you can get the answer from that.

Actually it does search all text, collects the words that match the autocompletion context,avoids duplicates. Not that fancy as I throught, but actually the performance is not as slow as I throught either :)

miguel
  • 159
  • 2
  • 9