set this widget active using QApplication::setActiveWindow.
take a look at QCursor::pos, note: this method returns current global mouse coordinates, if you need to map coordinates to particular coordinate system you should use one of map-functions: QWidget::mapFromGlobal, QWidget::mapFromParent etc.
Bookmarks