Results 1 to 4 of 4

Thread: keyboard event transfer

  1. #1
    Join Date
    Jul 2010
    Posts
    6
    Thanks
    1
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default keyboard event transfer

    Hi,

    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

  2. #2
    Join Date
    Jul 2008
    Location
    Germany
    Posts
    507
    Thanks
    11
    Thanked 76 Times in 74 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: keyboard event transfer

    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.

    Ginsengelf

  3. #3
    Join Date
    Jul 2010
    Posts
    6
    Thanks
    1
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: keyboard event transfer

    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!

  4. #4
    Join Date
    Jul 2008
    Location
    Germany
    Posts
    507
    Thanks
    11
    Thanked 76 Times in 74 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: keyboard event transfer

    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.

    Ginsengelf

  5. The following user says thank you to Ginsengelf for this useful post:

    vijayabcdef (22nd July 2010)

Similar Threads

  1. Keyboard event and QTextEdit
    By kaszewczyk in forum Newbie
    Replies: 2
    Last Post: 2nd November 2009, 19:30
  2. Mouse & KeyBoard Event
    By anafor2004 in forum Newbie
    Replies: 2
    Last Post: 26th October 2009, 11:39
  3. How to grad keyboard event
    By lengshuang in forum Qt Programming
    Replies: 1
    Last Post: 8th April 2009, 13:03
  4. how to manipulate the keyboard event?
    By Ricardo_arg in forum Qt Programming
    Replies: 2
    Last Post: 4th August 2008, 07:49
  5. Capture a keyboard event
    By mahe2310 in forum Qt Programming
    Replies: 8
    Last Post: 16th February 2006, 11:19

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.