How to read the only last three lines from a file in qt?
Printable View
How to read the only last three lines from a file in qt?
use readLine function in QFile
hope it helps
Bala
Check this:-
Attachment 8119
Read the file backwards by chunks and stop when you have found the beginning of the third-from-the-end line or the beginning of the file. Of course reading a text file backwards only works for self-synchronizing encodings (well, the only thing you need is the ability to synchronize on line ending sequences).