how to implement code completion in qt

autocomplete, c++, ide, qt

Solution

I think you should take a look at this: http://qt-project.org/doc/qt-4.8/tools-customcompleter.html

I used this example to understand CodeCompletion and I think it is fine :)

[edit] Qt has a own class for such purpose called QCompleter: http://qt-project.org/doc/qt-4.8/qcompleter.html

Problem

i am writing an ide using qt (on c++) and i need to add auto completion feature to it so i want to know : how to do that (i am using `qtPlainTextEdit`) ? what the data structure i should use ?

Original source