📜  qt图形场景图光标位置-C++代码示例

📅  最后修改于: 2022-03-11 14:44:53.223000             🧑  作者: Mango

代码示例1
QPoint viewPoint = ui->graphicsView->mapFromGlobal(QCursor::pos());
QPointF scenePoint = ui->graphicsView->mapToScene(viewPoint);
myWidget->setPos(scenePoint);