Results 1 to 3 of 3

Thread: redirection of standard input and output

  1. #1
    Join Date
    Jan 2006
    Location
    Gloucester, UK
    Posts
    18
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default redirection of standard input and output

    Two scenarios here.

    1. if I write a standard console type program this program starts another program which would normally send it's output to the standard output - how can i get this spawned program to redirect it's output back to my program?

    2. Scenario 2 - pretty much the same as aboove, but my program will be a QT GUI program which will start up some standard linux programs like ls, and grep but I want the standard output and stanadrd error outputs of these programs to come back to my GUI program for processing.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: redirection of standard input and output


  3. #3
    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: redirection of standard input and output

    QProcess provides all required functionality.
    J-P Nurmi

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.