Qt QString与QStringList

【Qt QString与QStringList】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("; "); // 注意,如果str是空字符串,list1会增加一个空字符串到列表里,其size=1,我为此吃过苦头~ for(int i=0; i

参考:https://www.cnblogs.com/findumars/p/4331049.html

    推荐阅读