Results 1 to 5 of 5

Thread: Mouse Events for 2 different GUI applications running on same screen.

  1. #1
    Join Date
    Jun 2015
    Posts
    3
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Mouse Events for 2 different GUI applications running on same screen.

    Hello,

    I have two different qt transparent applications having their own GUI running on the same screen.

    I have a requirement for the mouse events(mouse move, left and right clicks) to be captured and processed by application 1 in some instance and the mouse events to be captured and processed by application 2 in some other instance.

    How can this requirement be achieved.

    Thanks in advance.

    Regards,
    Meenakshi.
    Last edited by Meenakshi; 8th October 2015 at 06:25. Reason: updated contents

  2. #2
    Join Date
    Jun 2015
    Posts
    3
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Mouse Events for 2 different GUI applications running on same screen.

    Hello,

    I have two different qt transparent applications having their own GUI running on the same screen.

    I have a requirement for the mouse events(mouse move, left and right clicks) to be captured and processed by application 1 in some instance and the mouse events to be captured and processed by application 2 in some other instance.

    How can this requirement be achieved.

    Thanks in advance.

    Regards,
    Meenakshi.

  3. #3
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Mouse Events for 2 different GUI applications running on same screen.

    You asked this identical question 6 days ago. If you don't get an answer to your original post, don't start another thread.

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Mouse Events for 2 different GUI applications running on same screen.

    Thread's merged.

    Cheers,
    _

  5. #5
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Mouse Events for 2 different GUI applications running on same screen.

    two different qt transparent applications having their own GUI running on the same screen.
    Both of these are Qt applications? And you have written both of them (or have the source code)?

    If so, you may be able to use an event filter to capture the mouse events and emit signals from each app. The other app connects to these signals and provides slots to handle them.

    But what you want to do makes little sense in practice. Mouse events are associated with GUI objects like widgets or graphics items, and have a position relative to that object. You can translate that to be relative to the application main window or to the screen, but if the user moves anything around, then all the coordinates change, too. Each app would have to know all the details about the other app's GUI objects to be able to understand which object was the target of the mouse activity.

    It would make more sense to create a specific set of signals that you can use to send real information between your two apps, rather than just capture raw mouse events. If App 1 really wants to know that Button 2 was clicked in App 2, then you should devise a signal emitted by App 2 that says "Button2Clicked" instead of just mouse press event at (107, 42).

Similar Threads

  1. how to switch mouse control between multiscreen applications
    By bobythomas in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 12th August 2013, 16:29
  2. Replies: 3
    Last Post: 8th October 2011, 09:46
  3. Mouse events
    By Maluko_Da_Tola in forum Newbie
    Replies: 3
    Last Post: 25th August 2010, 06:55
  4. mouse events
    By xyzt in forum Newbie
    Replies: 3
    Last Post: 23rd March 2008, 11:14
  5. mouse moving don't produce mouse events
    By coralbird in forum Qt Programming
    Replies: 1
    Last Post: 13th September 2006, 06:13

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.