QFileSystemWatcher problem
-
Hello community,
I've tried to use the QFileSystemWatcher to watch changes inside a directory, it works fine on my machine but when I go on a colleague's machine and watch the same directory, he doesn't get notified when I edit the content of this directory but he gets notified when HE edits but then I am not notified anymore ... unless I edit again etc etc
The directory is writeable by everyone since we can both write in it.
def test(x): print 'file changed', x from PySide import QtGui, QtCore fileWatcher = QtCore.QFileSystemWatcher() fileWatcher.addPath('/path/to/dir') fileWatcher.directoryChanged.connect(test)
We are on CentOS Gnome 2.28.2
any idea ?
Thx
-
Hi
Are you modifying files over a network share (nfs) or in what way is the situation different for the editing case
he/you make changes ?As far as i understand QFileSystemWatcher uses inotify and that dont default works with nfs
https://stackoverflow.com/questions/4231243/inotify-with-nfs -
@Goffer
Hi
only if they fixed that inotify works with NFS as far as i understand it.
Its 7 years old thread but i google at bit and saw post 4
years ago having same issues.
So unless it works now, then i guess it cant work out of the box.
(unless you make it work) -
Well, I don't have the privileges nor the system knowledge to make it work in my company ...
I will give it a try with Qt5 if installed, maybe it's working.Otherwise, I will look for alternative solutions and post what I find
Thx for your time ! ;)