qt-interest@trolltech.com
[Top] [All Lists]

Re: How to start a process with console?

Subject: Re: How to start a process with console?
From: "Wu Yinghui, Freddie"
Date: Tue, 23 Aug 2005 16:07:13 +0800
yuxiaoyang wrote:
> Hi,all:
>  In my Qt application A,i wanna start process B(B is a program with 
> console).
> But in qt's document,it seems that QProcess can not start console program.
> And ideas about this?

I don't think this is true. You can start any process using QProcess in
general.

>   Further more,even the process B is started by QProcess::start int A 
> whithout console,i
> wanna read Stdout of B by QProcess::readStdOut.In B,i write strings to 
> stdout by printf,but A reads nothing.But if i add fflush() after 
> printf() in B,A get the right string.  At this instance,must fflush() is 
> called in B? If B is third party program,how to?

You can read the stdout of process B via QProcess, and you should also
write to the stdin of process B via QProcess. Process A's stdout has
nothing to do with process B's stdin.

Cheers,

Freddie

-- 
Wu Yinghui, Freddie
Research & Development
Software Engineer

Volume Interactions Pte Ltd
1 Kim Seng Promenade, #12-01
Great World City East Tower
Singapore 237994
Tel:   +65 62226962 (Ext 216)
Fax:   +65 62226215
Email: yhwu@xxxxxxxxxxxxxxxxxxxxxx
URL:   http://www.volumeinteractions.com

Important:  This message is intended for the recipient(s) addressed
above.  It contains privileged and confidential information.  If you are
not the intended recipient, please notify the sender immediately by
replying to this message and then delete it from your system.  You must
not read, copy, use, or disseminate this communication in any form.
Thank you.

Attachment: yhwu.vcf
Description: Vcard

<Prev in Thread] Current Thread [Next in Thread>