PDA

View Full Version : separate a QString



Zergi
18th July 2008, 21:18
Hi

I have question, Is any function that can separate QString? Example i have text "bla1%bla2%bla3%" and i want to separate this string to the table or QStringList, example
table[0] = bla1
table[1] = bla2
table[2] = bla3

I searched Assistant but I didn't find anything... Maybe I just overlook this function?

Best Regards

patrik08
18th July 2008, 21:50
http://doc.trolltech.com/4.4/qstring.html#split

on your case
QStringList list = QString_name.split('%');