[PyQt] Problem with QFileSystemWatcher

Baz Walter bazwal at ftml.net
Thu Dec 9 16:44:38 GMT 2010

On 09/12/10 12:26, NARCISO, Rui wrote:
> Hi all
> I can't seem to be able to make QFileSYstemWatcher work with a file (to see if it's contents change).
> At the end of this mail you'll find a minimum example that doesn't worked.
> I tried several connections with different syntaxes but nothing works.

in your example, you have:

     self.filename = '/home/to96665/toto'

if this is a file, you need to use:
     SIGNAL("fileChanged(const QString &)")

but if it is a directory, you need to use:

     SIGNAL("directoryChanged(const QString &)")

More information about the PyQt mailing list