[Qt-interest] QProcess for a prompted program
Gerardo Gutierrez
muzgash at gmail.com
Thu May 14 07:19:14 CEST 2009
I want to run an external program which is prompted (specifically gnuplot)
and communicate with it writing on his prompt.
I don't use writeToStdin() function because I'm using Qt4:
process::process(QString progname)
program->start(progname,QIODevice::ReadWrite);
qDebug()<<program->isWritable();
// program->execute(proc);
qDebug()<<"paso execute";
program->write("plot sin(x) pause -1");
qDebug()<<"paso plot";
}
I added the start function because the program wasn't writable without it.
--
"Solo existen 10 tipos de personas en el mundo...
las que saben binario y las que no"
_-`````-, ,- '- .
.' .- - | | - -. `.
/.' / `. \
:/ : _... ..._ `` :
:: : /._ .`:'_.._\. || :
:: `._ ./ ,` : \ . _.'' .
`:. / | -. \-. \\_ /
\:._ _/ .' .@) \@) ` `\ ,.'
_/,--' .- .\,-.`--`.
,'/'' (( \ ` )
/'/' \ `-' (
'/'' `._,-----'
''/' .,---'
''/' ;:
''/'' ''/
''/''/''
'/'/'
`;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090514/78670f90/attachment.html
More information about the Qt-interest-old
mailing list