As the docs state: -
QCursor::pos()
Returns the position of the cursor (hot spot) of the primary screen in global screen coordinates.
If you have multiple screens, you can use: -
QPoint QCursor::pos(const QScreen * screen)
Note that QScreen is for Qt 5