Results 1 to 1 of 1
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:
Code:
...
- 05-10-2009 #1
QProcess for a prompted program
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:
Code:process::process(QString progname) { progname="gnuplot"; program=new QProcess; 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 it wasn't writable without it.


Reply With Quote