void MainWindow::on_pushButton_clicked()
{
QDateTime da_time;
QString time_str=da_time.currentDateTime().toString("yyyy-MM-dd HH-mm-ss");
QString runPath = QCoreApplication::applicationFilePath();
ui->label->setText(runPath);
QDir *TEST = new QDir;
bool exist = TEST->exists("TEST");
if(!exist)
bool ok = TEST->mkdir("TEST");
QString fileName = "TEST/1.txt";
QString str="0000000nnnnnnnnnnnnnnnn";
QFile file(fileName);
if(!file.open(QIODevice::WriteOnly | QIODevice::Text|QIODevice::Append))
{
QMessageBox::warning(this,"sdf","can't open",QMessageBox::Yes);
}
QTextStream in(&file);
in<<time_str+":"+str<<"\n";
file.close();
}