c++ - QFileSystemWatcher::files() doesn't return a list of files -
I am using QFileSystemWatcher which is looking for a change in a directory I have Watcher-> AddPath ("mypath") method
When I call watch-> directory () then see mypath .
But when I watch-> I call the file () , I do not see anything. I thought I would see the file in the directory while using this method.
What should I do to see the file in a directory?
QFileSystemWatcher is to see changes in the file system.
Example:
QString files = QDir ("c: \\") to get a list of files in a directory. . Entry list (QDir :: NoDotAndDotDot); If you need to see a change in a directory (file added / renamed or deleted event) you use the addPath directory and < Code> directoryChanged signal.
If you need to see a change in the contents of the file, then use addPath with a full path in the file and listen to the fileChanged prompt.
Accordingly, directory returns a list of directories you have added and returns files the list of files you've added.
Comments
Post a Comment