Important: Please read the Qt Code of Conduct -

Monitoring a file in Qt

  • Hi,

    I would like to know how can I monitor a file in Qt, The scenario is that I am reading a file in xml format , parsing the file which appends a row to a tableView. But I want to monitor this file such in such a way that whenever a new node is added to the file, the reader should analyse that and start reading again from the last point to the end of file,

    How to achieve this ?


  • Lifetime Qt Champion


    QFileSystemWatcher or QSocketNotifier comes to my mind

    Hope it helps

  • Hi,

    QFileSystemWatcher to be notified when file changes and QXmlQuery to extract information

Log in to reply