QStringList fonts;
fonts << "Arialss" << "Helveticasss" << "Timessss" << "Couriersss";
QString str = fonts.join(",");
qDebug()<<str;
QString str = "name1ssss,path1sss,name2ss,path2sss,name3ss,path3ss";
QStringList list1sss = str.split(","); // 注意,如果str是空字符串,list1会增加一个空字符串到列表里,其size=1,我为此吃过苦头~
for(int i=0;i<list1.size();i++)
{
qDebug()<<list1.at(i);
}