QString与QStringList的转换,提取字符串,合并字符串
QString提取字符,变为多个字符串的常用方法,split还有其参数,具体查看assistant
QString str = "a,,b,c";QStringList list1 = str.split(",");// list1: [ "a", "", "b", "c" ]QStringList list2 = str.split(",", QString::SkipEmptyParts);// list2: [ "a", "b", "c" ]
list strsplit(());
使用jion就是逆向操作
str = list.join(",");