View Full Version : Qt IPC options & questions

Khal Drogo
18th November 2007, 19:57

I have two different Qt gui based applications, lets call them app A and app B.

App A spawns multiple B apps, and there needs to be two-way communication between them.
App A needs to send ocasionally commands to app B, i wanted to use the QProcess stdin/stdout mechanism to achieve that.
The B apps have to access frequently information in app A, i want to use QtSharedMemory for that (haven't tried it, so im just assuming at this point, that it will work).

My question is twofold:
1. I dont seem to get app B to receive anything on stdin. I set up things the following way:
In app A:
- create a process
- start it
- on a button pressed, i call a process.write("message\n")
In B apps.
- create a QFile
- open it, using fd 0(stdin) and readonly mode
- attach the file's readyRead signal to a custom slot

The custom slot in question never gets called. What did i miss?

2. I don't quite understand the concept of DBus, but can it be used in such a situation?
If so, could someone direct me to some detailed explanations, and perhaps sample code (other than those in the Qt Assistant)?

I appreciate your help, thank you.

Khal Drogo
19th November 2007, 10:03
I would be very grateful if i could get an answer to question 1, even if someone doesn't have time for the rest.

Thank you.