Results 1 to 2 of 2

Thread: issues with kprocess and qprocess

  1. #1
    Join Date
    Jan 2006
    Location
    germany
    Posts
    75
    Thanks
    9
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default issues with kprocess and qprocess

    i have a problem with both of these classes. they seem to be unable to show output (std or err) from sub-processes spawned by the process they execute. what i need them for is to run the freebsd command portupgrade, this spawns extra process to fetch files and output is completely missing.
    even if i run the command with an sh -c "..." frame or try to redirect it using | tee logfile it wont show up. if use the unix native file-descriptors and popen it works; but only when not run from inside kdevelop, i guess because kdevelop internally uses the kprocess to start the app.
    is this default behaviour?
    what can i do about it?
    Quote Originally Posted by Bertolt Brecht
    What is the robbing of a bank compared to the founding of a bank?

  2. #2
    Join Date
    Jan 2006
    Location
    Florida
    Posts
    24
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: issues with kprocess and qprocess

    (I don't remember what version you have but the methods below apply to Qt 4.0 or higher)

    are you using the following methods in QProcess:

    readAllStandardError ()
    readAllStandardOutput()
    readChannel()
    setReadChannel()

    This will all give you access to what's going on with Input/Output from a QProcess spawned process. Alternatively, you can try to pipe the data to a file.

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.