I am just trying to write a file...but its not writing can u check whats wrong in this. the file should be generated in my current directory but there's no file generated.
QFile file("resumePDF.dat");
if(!file.
open(QFile::WriteOnly)) console->mainwindow->statusBar()->showMessage(tr("file resumePDF.pdf cannot be opened for writing !!!"),5000);
out << "My name is Sujan Dasmahapatra" << "\n";
file.close();
QFile file("resumePDF.dat");
if(!file.open(QFile::WriteOnly))
console->mainwindow->statusBar()->showMessage(tr("file resumePDF.pdf cannot be opened for writing !!!"),5000);
QTextStream out(&file);
out << "My name is Sujan Dasmahapatra" << "\n";
file.close();
To copy to clipboard, switch view to plain text mode
Bookmarks