PDA

View Full Version : QProcess1



sujan.dasmahapatra
23rd March 2009, 14:39
Dear Friends I want to run a program(executable) from within my code for that I am doing like this…

Bool TableWidget::saveFileTYK()
{
QString program(“./home/sdh/WindlyzerDev/interpolate_tyk”);

QProcess *tykprocess = new QProcess(this);

Tykprocess->start(propgram);

connect (tykprocess,SIGNAL(started()),this,SLOT(myslot())) ;
}
void TableWidget::myslot()
{
qDebug() << “program started” << “\n”;
}

But here I am not getting the signal started() that means my program is not running can u tell me anyone what could be the problem plss ??

lni
23rd March 2009, 14:50
Too late to connect, change the calling order:

connect (tykprocess,SIGNAL(started()),this,SLOT(myslot())) ;
Tykprocess->start(propgram);