有没有办法让QCompleter像多词自动完成一样工作?
有人有想法如何做到这一点吗?
我不知道我是否理解正确:
QStringList wordList;
wordList << "alpha and beta" << "omega" << "omicron" << "zeta";
QCompleter *completer = new QCompleter(wordList, this);
completer->setCaseSensitivity(Qt::CaseInsensitive);
QLineEdit *lineEdit = new QLineEdit(this);
lineEdit->setCompleter(completer);