PDA

View Full Version : How do you parse a string in qt C++?



brandanorama
26th January 2014, 19:57
How would I parse through a string with integers and strings and set them equal to corresponding variables? For example if I had a QString like "Brandan 1 2 3" and wanted to set name to "Brandan", num1 to 1, num2 to 2, and num3 to 3. Any input would be greatly appreciated.

ChrisW67
26th January 2014, 20:04
QString::split() and QString::toInt()