PDA

View Full Version : Continous read of the File



Snaidy
27th August 2016, 17:48
Hi All,
I have written an program to read a file and parse it for my data and display in an table.
Now I want it to read the file continuously for any changes i the file and do live update in the table.
How I can achieve this ?


Thanks,
Snaidy

d_stranz
27th August 2016, 18:46
Use QFileSystemWatcher to monitor the file for changes. Connect a slot in your parsing class to the QFileSystemWatcher::fileChanged() signal. When that signal is emitted, re-read and parse the file to update your table.