bashamehboob
16th May 2008, 17:53
Hi ALL,
I am using Qt4.2.3.
In my code , I have started a QProcess and reading Stderr and posting it to the GUI.While reading Stderr at one condition i have to start another QProcess and read Stderr.As Follows.
void Config::readFromStderr()
{
while(( length = proc->readLine(buf,sizeof(buf))) != -1 && !(START_FLAG))
{
dat = (QString)buf;
if(dat.indexOf(" Manager configuration file loaded", 0 , Qt::CaseInsensitive) != -1)
{
proc1 = new QProcess(this);
connect(proc1, SIGNAL(readyReadStandardError()), this, SLOT(readFromStderr1()));
proc1->start(home1,list1,QIODevice::ReadWrite);
}
}}
first time if i run , first process is running and after that second process is running successfully and i can read the data from Stderr from both the processes.
second time if i run, first process is running , but i can't read the data from Stderr.
Why is that i can't read the data from Stderr ??:confused:
I am using Qt4.2.3.
In my code , I have started a QProcess and reading Stderr and posting it to the GUI.While reading Stderr at one condition i have to start another QProcess and read Stderr.As Follows.
void Config::readFromStderr()
{
while(( length = proc->readLine(buf,sizeof(buf))) != -1 && !(START_FLAG))
{
dat = (QString)buf;
if(dat.indexOf(" Manager configuration file loaded", 0 , Qt::CaseInsensitive) != -1)
{
proc1 = new QProcess(this);
connect(proc1, SIGNAL(readyReadStandardError()), this, SLOT(readFromStderr1()));
proc1->start(home1,list1,QIODevice::ReadWrite);
}
}}
first time if i run , first process is running and after that second process is running successfully and i can read the data from Stderr from both the processes.
second time if i run, first process is running , but i can't read the data from Stderr.
Why is that i can't read the data from Stderr ??:confused: