As per the Qt5.11 documentation, QFileSystemModel::setRootPath
Sets the directory that is being watched by the model to newPath by installing a file system watcher on it. Any changes to files and directories within this directory will be reflected in the model.
But in the case of my test code, a part of which is as below:
auto model = new QFileSystemModel(this);
model->setRootPath("C:/adb");
ui.treeView->setModel(model);
The whole file system is being watched. Even if I make a change in E drive I can notice the same getting reflected in the view (model). This behavior seems to be different from the documentation. What am I missing here?