QFile file("log.txt"); file.open(QIODevice::Append ); QTextStream out(&file); out << "-----------------------serial-------------------"; out << serial; out << "\n"; out << "----------------------------- 1 test-----------------------------"; out << "\n"; out << tn; out << "\n"; out << tk; out << "\n"; out << F; out << "\n"; out << "-----------------------------end 1 test-----------------------------"; out << "\n"; out << "-----------------------------2 test-----------------------------"; out << "\n"; out << fzax; out << "\n"; out << Tzax; out << "\n"; out << Tyd; out << "\n"; out << Fgc; out << "\n"; out << "----------------------------- end 2 test-----------------------------"; file.close();
C++ (Qt)QDateTime QDateTime::currentDateTime () [static]