Qt-interest Archive, January 2007
Writing back to file line by line
Message 1 in thread
Is there any way to write back to file line by line as we do for reading
using
QTextStream stream( &myFile ); // Set the stream to read from myFile
line = stream.readLine();
Thanks
Manish
Message 2 in thread
Hello Manisj,
sometimes it is a good idea to look into the Qt docs...
The documentation of QFile contains that:
QFile file("out.txt");
if (!file.open(QIODevice::WriteOnly | QIODevice::Text))
return;
QTextStream out(&file);
out << "The magic number is: " << 49 << "\n";
Regards,
Falko
--- Original-Nachricht ---
Absender: Agarwal Manish Kumar-A17122
Datum: 19.01.2007 11:23
> Is there any way to write back to file line by line as we do for
> reading using
>
> QTextStream stream( &myFile ); // Set the stream to read from myFile
> line = stream.readLine();
>
> Thanks
> Manish