QProcess and kfmclient exec problem
Hi all,
I'm using QProcess and kfmclient exec <filename> on Linux. I want to open file and wait for close. But when using kfmclient , after opening file QProcess emit finished signal but my <filename> still open.
On Windows, I'm using QProcess and cmd.exe for opening exernal file and it waits until <filename> file closed.
How can i do this on linux?How can i use kfmclient for opening any file( with correct app) and wait until closed.
Thanks in advance
Ramazan
Re: QProcess and kfmclient exec problem
"Waiting until closed" would mean your application would be frozen meanwhile. Is that really what you want? Btw. there is QDesktopServices::openUrl() which uses kfmclient on KDE but works on other platforms too, out of the box.
Re: QProcess and kfmclient exec problem
Quote:
Originally Posted by
jpn
"Waiting until closed" would mean your application would be frozen meanwhile. Is that really what you want? Btw. there is
QDesktopServices::openUrl() which uses kfmclient on KDE but works on other platforms too, out of the box.
i have just tried QDesktopServices class. But it doesn't blockmy application.While new opened file still open , my application exit. I want to block my application or a signal like QProcess::finished() for understand new opened file closed. On windows i can do this with cmd.exe and QProcess but on linux kfmclient exe doesn't wait for new opened file to close. kfmclient exits immediately while new opened file still open.
Re: QProcess and kfmclient exec problem
Hi everybody !!!
How can i solve this problem.???
Re: QProcess and kfmclient exec problem
Blocking an application sounds brutal. Why don't you use QFileSystemWatcher to detect changes to the file?
Re: QProcess and kfmclient exec problem
Quote:
Originally Posted by
jpn
Blocking an application sounds brutal. Why don't you use
QFileSystemWatcher to detect changes to the file?
I don't want to watch changes of file. I want to be aware of closing of file. I want to open file and when file is closed i want to do other some works.QFileSystemWatcher is not agreeable for me.Thanks for your answer.