QFiles input with and without overwriting data
-
how to open a file and write some data after the last line written in the file and withou overwriting the old data...also howa to do like the file was empty and delete old data?? thx in advance
-
Something like:
@myFile->open(QIODevice::Append)@
should work.
-
Take a look at the various "OpenMode":http://doc.qt.nokia.com/latest/qiodevice.html#OpenModeFlag-enum flags.
In addition, see "QFile::seek()":http://doc.qt.nokia.com/latest/qfile.html#seek and "QSeek:resize()":http://doc.qt.nokia.com/latest/qfile.html#resize.