Results 1 to 6 of 6

Thread: QProcess and kfmclient exec problem

  1. #1
    Join Date
    Jul 2007
    Posts
    35
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question 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

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default 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.
    J-P Nurmi

  3. #3
    Join Date
    Jul 2007
    Posts
    35
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QProcess and kfmclient exec problem

    Quote Originally Posted by jpn View Post
    "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.

  4. #4
    Join Date
    Jul 2007
    Posts
    35
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QProcess and kfmclient exec problem

    Hi everybody !!!
    How can i solve this problem.???

  5. #5
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QProcess and kfmclient exec problem

    Blocking an application sounds brutal. Why don't you use QFileSystemWatcher to detect changes to the file?
    J-P Nurmi

  6. #6
    Join Date
    Jul 2007
    Posts
    35
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QProcess and kfmclient exec problem

    Quote Originally Posted by jpn View Post
    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.