QStringList与QString互转

QStringList fonts;
fonts << "Arial" << "Helvetica" << "Times" << "Courier";
QString str = fonts.join(",");


QString str = "name1,path1;name2,path2;name3,path3";
QStringList list1 = str.split(";");
for(int i=0;i<list1.size();i++)
{
QStringList list2 = list1[i].split(tr(","));
}

你可能感兴趣的:(String)