Hello I want to write a text in a QFile , for example /home/hello.txt.
Does anybody know any example of code for doing it ?
Thanks
Gorka
Hello I want to write a text in a QFile , for example /home/hello.txt.
Does anybody know any example of code for doing it ?
Thanks
Gorka
Yes, I do. And also the documentation. Search it!
here .. try this one:
Qt Code:
void MainWindow::on_pushButton_clicked() { if(!outputFile.isOpen()) { //alert that file did not open } outStream << str; outputFile.close(); //open text file to user }To copy to clipboard, switch view to plain text mode
Bookmarks