Описание тега qcompleter

A QCompleter is a class from the Qt toolkit which provides completions based on an item model.

QCompleter can be set to provide auto-completion for any widget.

A simple example of using the QCompleter will look like this:

//this will contain the words for autocompletion.
QStringList words;
//Let's populate it:
words << "hello" << "word" << "this" << "is" << "qt" << "auto-completer";
//We will be using auto-completer for a QLineEdit
QLineEdit * l = new QLineEdit();
//Creating the QCompleter, and giving it the word list
QCompleter * completer = new QCompleter( words );
//Setting the case sensivity
completer->setCaseSensitivity( Qt::CaseInsensitive );
//Assigning the completer to the LineEdit
l->setCompleter( completer );
//And finally showing the edit.
l->show();

The official Qt documentation can be found here for Qt 4.8 and here for Qt 5.