I'm developing an app on windows with Qt and I need to detect changes in a specific folder. So I used a QFileSystemWatcher, and I connect the directoryChanged signal to a function that will send a message in case of changes.
The problem is that the "slot" function connected to directoryChanged is not called if I modify a file's content, but only when a file or directory is removed or added.
However, the documentation says that this signal is emitted when "the directory at a specified path, is modified (e.g., when a file is added, modified or deleted) or removed from disk."
Does anyone have an explanation? Thanks in advance =)
According to Qt source code version 4.8.2, as following:
It seems that directoryChanged emit when a file removed, added(for the new added file not contains in directories), and renamed. The implementation does not guarantee to detect a modification of a file's content. Hope that helps :P