double value1 = 10;
double value2 = 20;
QFile file("./file.csv");
if(file.open(QFile::WriteObly|QFile::Truncate))
{
QTextStream stream(&file);
stream << value1 << "," << value2 << "\n";//一行两列
}
file.close();
double value1 = 10;
double value2 = 20;
QFile file("./file.csv");
if(file.open(QFile::WriteObly|QFile::Truncate))
{
QTextStream stream(&file);
stream << value1 << "," << value2 << "\n";//一行两列
}
file.close();