How can I open a QFile for appending, i.e. the equivalent of
FILE *f = fopen("myfile.txt", "a");
Open the file in QIODevice::Append mode:
QIODevice::Append
QFile f(...); if (f.open(QIODevice::WriteOnly | QIODevice::Append)) { ... }
See also the documentation.
2.1m questions
2.1m answers
60 comments
57.0k users