Error is in "QPoint pos = d->viewport->mapFromGlobal(QCursor::pos());". It tries to map global coordinates to viewport's coordinates, but viewport's rect EQUALS the rect of QGraphicsProxyWidget in QGraphicsScene! And rect of QGraphicsProxyWidget in QGraphicsScene is always the same (x=70, y=0), independently of MainWindow position on the screen!