How to Split a QString by White Spaces

Posted on Posted in Qt Tutorials, Tutorials

You need to use a QRegExp to achieve this. “\s” means any white space character and “+” means any number of that pattern. So you can use the following line to find any number of consecutive white spaces and split you string:


Leave a Reply

Your email address will not be published. Required fields are marked *