You are not logged in.

1

Monday, August 5th 2013, 12:45pm

Communication between my QTApplication and another QTApplication wich i start as .exe via QProcess

Hallo,
I want to Build a QTApplication which opens another Application (build and compiled in QT to an .exe File). I use QProcess for this. That works fine, but now I want to send some Strings between this to applications. How can I do this? Is there any Signals and Slots that i could use for this?

Tanks a lot!

Junior

Professional

  • "Junior" is male

Posts: 1,623

Location: San Antonio, TX USA

Occupation: Senior Secure Systems Engineer

  • Send private message

2

Tuesday, August 6th 2013, 1:54pm

You will need to look at interprocess communications like Dbus and others to perform communications between separate applications/processes.

3

Wednesday, August 7th 2013, 1:29pm

Look at :
QProcess::setReadChannel() in order to chose whether your data chose come from standard or error output.

Then manage your QProcess as a classic QIODevice, using waitForReadyRead(), readLine() for example.
You can also use signals/slot if you prefer:

Source code

1
connect(yourPlatformProcess,SIGNAL(readyReadStandardOutput()),this,SLOT(onReadyReadStandardOutput()));