QList<QStringList> RwCvs::readToList(const QString &path, const QString separator)
{
QList<QStringList> set;
QFile fs(path);
if(fs.open(QFile::ReadOnly | QFile::Text)){
QTextStream stream(&fs);
//读取单行数据
QString lines;
while (stream.readLineInto(&lines)) {
set.push_back(lines.split(separator,QString::KeepEmptyParts));
}
}
return set;
}
cvs 文件如何解析?
猜你喜欢
转载自www.cnblogs.com/cheungxiongwei/p/9626560.html
今日推荐
周排行