PDA

View Full Version : mouse position



PSYCOR
5th September 2016, 17:23
Hello
how can i get mouse position over the window ?

anda_skoa
5th September 2016, 18:22
Depends on what you want to do.

Generally the global position can be retrieved with QCursor::pos(), but maybe you need to track mouse movement which would require to implement the QWidget::mouseMoveEvent() handler.

Cheers,
_

d_stranz
6th September 2016, 03:29
and call QWidget::setMouseTracking() with "true".