View Full Version : keyboard event transfer

21st July 2010, 03:50

i need to perform same action (if invoked by keyboard) in two machines running same application connected on ethernet.

i dont wanr ro maintain focus widget, current window, main window seaparately in application all that is anyhow maintained by combination of Qt and X-server.

for that how can i transfer key-events to other machine and how other machine will treat it as if it were it's own event

21st July 2010, 08:04
Hi, just transfer some message with the event type and necessary information to the second machine. Then use QCoreApplication::sendEvent() to create an event in the application on the second machine.


21st July 2010, 15:39
but that event is to be performed on particular object whose pointers are different in both machines.
pointer information in one machine is invalid for other.
to be specific, focus widget pointers are different in both machines, but that information is needed to deliver user made event!

22nd July 2010, 07:54
Yes, the pointers are of course different. But you can use the objectName and QObject::findChildren () to find the matching object in the other application.