Quantcast
Channel: Jobs
Viewing all articles
Browse latest Browse all 18427

Sending Data to QProcess

$
0
0
HI, I have two sample QT4 GUI applications. With the help of my 1stApp I launch my 2ndApp using Qprocess. I linked the Qprocess readyReadStandardOutput() to my slot on 1stApp, so I can read the whatever data send by my 2ndApp. Everytime I move my 2nd App window, I write the new window location to stdout using fprintf(), and I read this in my 1stApp slot as below     QProcess* p = (QProcess*) sender();     QByteArray outputText = p->readAllStandardOutput();     qDebug() << "TEST05:RECEIVED"<<outputText; All is well. Effectively I can read the status of my 2ndApp from my 1stApp. Now I want to control my 2ndApp from my 1stApp. But I can’t receive data in 2ndApp (send from 1stApp stdout). I want to use something like below (This may be not correct as my 1stApp is not a Qprocess, so wouldn’t emit a readyReadStdout() signal) connect(parent,SIGNAL(readyReadStdout()),this,SLOT(my2ndAppSlot())); Is there a way I can connect my 1stApp stdout to a Qprocess (2nApp), so I can read the parent data? Thanks in advance

Viewing all articles
Browse latest Browse all 18427

Trending Articles