In fact I had already tried that syntax without any success.

Further tests showed that in fact I am able to "watch" a file if it's in the 
same folder as my application, ie, if the path that I add to the watcher is 
just the name of the file with no other folder/levels.

As soon as I try to watch a file elsewhere, it simply does nothing ...

Why would this happen ?


-----Message d'origine-----
De : Baz Walter [mailto:[email protected]] 
Envoyé : jeudi 9 décembre 2010 17:45
À : NARCISO, Rui
Cc : PyQt mailing list
Objet : Re: [PyQt] Problem with QFileSystemWatcher

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 &)")

This mail has originated outside your organization, either from an external 
partner or the Global Internet.
Keep this in mind if you answer this message.



The information in this e-mail is confidential. The contents may not be 
disclosed or used by anyone other than the addressee. Access to this e-mail by 
anyone else is unauthorised.
If you are not the intended recipient, please notify Airbus immediately and 
delete this e-mail.
Airbus cannot accept any responsibility for the accuracy or completeness of 
this e-mail as it has been sent over public networks. If you have any concerns 
over the content of this message or its Accuracy or Integrity, please contact 
Airbus immediately.
All outgoing e-mails from Airbus are checked using regularly updated virus 
scanning software but you should take whatever measures you deem to be 
appropriate to ensure that this message and any attachments are virus free.

_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to