I'm currently using a QFileSystemWatcher to monitor a directory for any changes to the files contained within. This work great, but only when I change those files with certain programs.
For example, when I change a file using Qt Creator, the QFileSytemWatcher triggers correctly. If I edit and save the exact same file the exact same way using, say, Notepad++ or Eclipse, it doesn't trigger that the file is changed.
I'm fairly certain that this has to do with how the OS/programs handle write buffering. My program unfortunately doesn't have any control over how the writes are being done; any program can change the files I am monitoring. As a result, the only way that I can think of reliably detecting changes in files is by using a regular timer to scan for file changes (which is much less efficient than the OS watching files for me). Are there any better ways of doing this? Any help is appreciated.