How can i just read first 2 lines of the file but not entirely load it to RAM
-
like noted above,If the file is GB level,i want just 2 first lines data(in bytes).
of course, the line is variable so need to find the 2 \n position.Despite the performance,the RAM is totally not doable for load the whole file.will crash.
any advice?
-
Hi,
You want QFile::readLine(). See http://qt-project.org/doc/qt-5/qfile.html