Results 1 to 3 of 3

Thread: Capture mouse clicks (their x,y location and their type)

  1. #1
    Join Date
    Jul 2010
    Location
    /home/hakermania/
    Posts
    233
    Thanks
    129
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Capture mouse clicks (their x,y location and their type)

    What I want to do is to capture the location of the whole screen of the x,y location of their clicks and their type.

    I don't have a clue and google didn't help me, because all I saw were about the clicks considering the application itself and not the whole desktop.

    Any help appreciated.


    Added after 41 minutes:


    Well, I know that you can set the mouse go to x,y, so, why not to capture the places where it clicked or to do your own pseudoclicks?
    Last edited by hakermania; 23rd April 2011 at 11:31.
    When you 're trying to help somebody in the newbie section, don't forget that he is a newbie. Be specific and give examples.

  2. #2
    Join Date
    Sep 2008
    Location
    Poland
    Posts
    80
    Thanks
    4
    Thanked 5 Times in 4 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: Capture mouse clicks (their x,y location and their type)

    Check:
    QDesktopWidget
    QMouseEvent.globalPos()

  3. The following user says thank you to MasterBLB for this useful post:

    hakermania (25th April 2011)

  4. #3
    Join Date
    Mar 2011
    Posts
    63
    Thanks
    11
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Capture mouse clicks (their x,y location and their type)

    You can also take a look at
    Qt Code:
    1. QCursor::pos()
    To copy to clipboard, switch view to plain text mode 

    "Returns the position of the cursor (hot spot) in global screen coordinates"

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

    hakermania (25th April 2011)

Similar Threads

  1. Replies: 3
    Last Post: 12th May 2010, 13:11
  2. Generating Mouse Clicks
    By Ebonair in forum Qt Programming
    Replies: 2
    Last Post: 4th July 2009, 18:20
  3. How to handle double clicks with mouse?
    By Morea in forum Qt Programming
    Replies: 1
    Last Post: 14th January 2007, 12:01
  4. Replies: 3
    Last Post: 29th August 2006, 15:07
  5. Detecting mouse clicks outside of widget
    By init2null in forum Qt Programming
    Replies: 2
    Last Post: 5th May 2006, 19:16

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.