PDA

View Full Version : Capture mouse clicks (their x,y location and their type)



hakermania
23rd April 2011, 11:31
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?

MasterBLB
23rd April 2011, 12:50
Check:
QDesktopWidget
QMouseEvent.globalPos()

meazza
23rd April 2011, 13:36
You can also take a look at
QCursor::pos()

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