views:

168

answers:

2

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 ?

+1  A: 

That's a big, complex feature. I'd look at how it's been done in the Qt Creator.

Tadeusz A. Kadłubowski
+5  A: 

I think you should take a look at this:
http://doc.trolltech.com/4.6/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://doc.trolltech.com/4.6/qcompleter.html

Tobias