[Interest] QFileSystemWatcher and accesing files in monitored directory...

John Weeks john at wavemetrics.com
Mon Aug 31 22:13:00 CEST 2015


> On Aug 31, 2015, at 12:49 PM, Igor Mironchik <igor.mironchik at gmail.com> wrote:
> 
> Pixmap is not null... Image was saved for the half and I read it... Pixmap successfully loaded but draws only first part of the image while the next one is grey...

I forget how Linux works- can you try opening for write? On the systems I know, you can't open for write from two different processes. If you get an error for writing then the file is still being filled.

Seems like I recall that Linux allows two processes write to file. There must be some way to open a file that excludes other processes, and that it would fail if already open elsewhere.

(Horrible hack ahead) Or get the number of bytes in the file, wait a bit and get the number again. If it changes, it's still being filled.

-John Weeks




More information about the Interest mailing list