kaiou.wang
6th July 2010, 12:56
I'm using QFileSystemModel and QTreeView to display files tree from a shared network location (Samba).
Model->setRootPath("//HostName");
TreeView->setModel(Model);
TreeView->setRootIndex(Model->index("//HostName"));
The code works fine and I got the file tree. However, it can not automatically pick up the changes there. For example, if I create a new file there, the tree don't display this new file.
When I set the path to a directory on local hard drive, like "D:/temp". It works. It picks up the changes and update itself.
Any idea how can I pick up changes from a shared network location and refresh the model/tree?
Model->setRootPath("//HostName");
TreeView->setModel(Model);
TreeView->setRootIndex(Model->index("//HostName"));
The code works fine and I got the file tree. However, it can not automatically pick up the changes there. For example, if I create a new file there, the tree don't display this new file.
When I set the path to a directory on local hard drive, like "D:/temp". It works. It picks up the changes and update itself.
Any idea how can I pick up changes from a shared network location and refresh the model/tree?