You need to use Positive Lookahead feature and build your regexp string using all words entered. Here's a quick example (let's suppose input one two three
):
QRegExp re("^(?=.*one)(?=.*two)(?=.*three).*$");
qDebug() << re.exactMatch("two three one four"); // returns true