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;
}

相关文章:

  • 2022-12-23
  • 2021-07-27
  • 1970-01-01
  • 2021-11-04
  • 2021-04-15
  • 2022-01-17
  • 2021-08-26
  • 2021-05-27
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-03-04
  • 2021-10-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案