Results 1 to 11 of 11

Thread: QProcess and console programs

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2007
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QProcess and console programs

    Well, it seems i need to specify some details:
    Suppose i have console program (worked in text mode), without any source - only executable (so i cant change anything in this program, like put fflush() somewhere in it), which periodically outputs some info to the screen (for example, gets it from network), and allows me to input some "commands" which it then "process" and shows me result. To stop this program i need to enter "quit" command.
    I want to start several such programs from one Qt application and have ability to check running status and stop/restart them if necessay. And also it would be very desirable to get access to program console.
    But if i do that with QProcess start() method, i cant get program window, cant view program output and cant input anything (well, may be can - but dont see it).
    If i use startDetached() - i get program window, but lose control at it from my Qt application.
    Any ideas?

    evgenM: closeWriteChannel() works in my simple example (just stop it), but doesnt work in other cases

  2. #2
    Join Date
    Mar 2006
    Posts
    48
    Thanks
    5
    Thanked 4 Times in 3 Posts

    Default Re: QProcess and console programs

    i realy not understand the problem - u do right all u must do - problem only in this bugged console app (no flush) - i am not sure u can fix it in YOUR app. So u have one way - ask author to correct.

Similar Threads

  1. Replies: 8
    Last Post: 28th January 2015, 09:45
  2. How to run a console program "silently"?
    By fullmetalcoder in forum Qt Programming
    Replies: 9
    Last Post: 23rd July 2006, 10:03
  3. QProcess / system call not working under linux. Why?
    By johnny_sparx in forum Qt Programming
    Replies: 12
    Last Post: 11th March 2006, 00:32

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
  •  
Qt is a trademark of The Qt Company.