January 2019
Intermediate to advanced
384 pages
11h 50m
English
The QSaveFile provides a transactional semantics when writing files – it doesn't have a close() method, but uses commit() to finally store the data. When an error occurs, no data will be stored at all. QTemporaryFile offers the safe creation of unique temporary files.
Finally, QBuffer is a helper class that allows us to access a QByteArray using the QIODevice interface. In this way, the QByteArray, which is used to store both raw bytes (including '\0') and traditional C style '\0' terminated strings, can be treated in the same manner as a standard random-accessed file!
Read now
Unlock full access