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.