I do not know if I understand correctly:
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);
If you type alp, you will end up with "alpha and beta" that contains more than one word. No limit.
Update after clarification:
It seems that a new autocomplete is requested to start after the delimiter value. In the current case, this delimiter will be space. An equivalent example is the
detailed tree model from Qt examples. This example illustrates how to solve the same situation.