PDA

View Full Version : QMouse Events, Why int?



Atomic_Sheep
23rd May 2012, 08:08
Why are:


int globalX () const
int globalY () const

and


int x () const
int y () const

integers? Is it because everything is in terms of pixels?

AlekseyOk
23rd May 2012, 09:04
Yes.

globalX(), globalY() returns position of mouse event from top left SCREEN corner when x(), y() - from top left WINDOW corner.

Atomic_Sheep
23rd May 2012, 14:41
Thanks, hmm where the origin was surprised me, thanks for elaborating.