C++ (Qt)QStringList intuitiveSearch(QStringList list, QString text){ QStringList result; for (int i=0; i<list.count(); i++) if (list.at(i).contains(text, Qt::CaseInsensitive)) result.append(list.at(i)); return result;}
SQLSELECT name FROM my_table WHERE name LIKE('%search_text%');
QSqlQueryModel *model = new QSqlQueryModel(this);model->setQuery("SELECT name FROM contragents ORDER BY name"); //запрос, ясное дело, вашQCompleter *completer = new QCompleter(this);completer->setModel(model);completer->setModelSorting(QCompleter::CaseSensitivelySortedModel);lineEdit->setCompleter(completer);