Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/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 ?

    Regards
    Sam


  • Lifetime Qt Champion

    Hi,

    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