[SOLVED] Connecting Signal & Slot between two application on different machines !
-
Hi,
is there a way for connecting Signal & Slot between two application on different machines? I read QtDBUS docs. but i found that d-bus works on the same machine. -
different machines basically need to communicate over the network. Thus you can either implement a custom protocol which is tcp-socket based or you use an existing middleware. Also you could use XML-/JSON-RPC to call methods from one machine on another.
Meaning there is no built in feature in Qt for what you are looking for. -
Look into using libQxt. It provides QxtRpcPeer and QxtRpcService classes that can probably help you achieve what you need.
-
Hi,
What kinds of machines are you connecting?
Signals-slots and D-Bus are for the same machine only. For different machines, you need to use networking: http://qt-project.org/doc/qt-5.1/qtnetwork/qtnetwork-index.html
Edit: Ah, that's a neat library, Andre. Looks like it takes care of the low-level networking already.
-
Indeed, I used them between an android device and a computer and it was working pretty well (With Qt 4)
-
Hi SGalst, did you use D-Bus or libQxt?
-
Sorry, I forgot to say that, libQxt :)
-
Hello Andre,
i read QxtRPCService document. Do you have a sample of these? -
and you,SGaist ! do you have a simple example of this?
-
No, I don't have a sample. It doesn't look too complicated to use though.
-
tnx Andre, your solution is working nicely :)