qt graphics scene map cursor position code example
Example: qt graphics scene map cursor position
QPoint viewPoint = ui->graphicsView->mapFromGlobal(QCursor::pos());
QPointF scenePoint = ui->graphicsView->mapToScene(viewPoint);
myWidget->setPos(scenePoint);