Regarding using QFile::readAll
-
It heavily depends on your use case, the size of the file, the amount of memory available - and probably many other parameters. But in general it is perfectly legitimate to read files as a whole.
Yes, it can be a good idea to read a whole file using QFile::readAll().
No, it can be a bad idea to read a whole file using QFile::readAll().