Signal in Qt which emits its signal if a file is pasted in a directory?
Hi
I have a little problem. I'm writing a console programm which should watch a directory. If a file is pasted, the programm should do some work. I'm using the QFileSystemWatcher, but he also emits a signal when a file gets deleted.
The signal should be emitted when a file is pasted. Do you have some suggestions?
Maybe I have ti write my own signal? But how?
Thank you!
Re: Signal in Qt which emits its signal if a file is pasted in a directory?
Use QFileWatcher and compare the directory contents before the signal and after the signal and you'll know wheter a new file appeared or not.
Re: Signal in Qt which emits its signal if a file is pasted in a directory?
Thank you for your reply! Ok a good idea, but I can't find a class named QFileWatcher.
I use Qt 4.7...
Re: Signal in Qt which emits its signal if a file is pasted in a directory?
Sorry, should be QFileSystemWatcher.