I\'ve to split simple QStrings of the form \"number number number\",for example \" 2323 432 1223\". The code i use is
QString line; QRegularExpression re(\"(\\
If the usage of regular expressions isn't mandatory, you could also use QString's split()-function.
QString str("2323 432 1223"); QStringList list = str.split(" "); for(int i = 0; i < list.length(); i++){ qDebug() << list.at(i); }