Qt 6.11 is out! See what's new in the release
blog
[SOLVED] How can I delete the content of a file with Qt ?
General and Desktop
5
Posts
4
Posters
15.6k
Views
1
Watching
-
How can I delete all the content of a file (I want to delete its content - not to delete the file) ?
-
Open the file with QIODevice::Truncate flag.
-
Use "QFile::resize()":http://doc.qt.nokia.com/latest/qfile.html#resize
-
Thanks!
That solved the problem. -
Kindly please edit the title of the thread to begin with [SOLVED]
;-)