void writeResult(std::string fileName){ std::ofstream corell(fileName.c_str()); if(corell.is_open()) { corell<<" Какойто текст "<<std::endl; } }void dialoggg::on_pushButton_clicked(){ QString fileName = QFileDialog::getSaveFileName(this, "Save"); std::string temp=fileName.toStdString(); writeResult(temp);}
C++ (Qt)/*use upon your own consideration*/std::string fileName = QFile::encodeName(QFileDialog::getSaveFileName(this,tr("Save"))).data();