Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

qt graphics scene map cursor position

QPoint viewPoint = ui->graphicsView->mapFromGlobal(QCursor::pos());
QPointF scenePoint = ui->graphicsView->mapToScene(viewPoint);
myWidget->setPos(scenePoint);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #qt #graphics #scene #map #cursor #position
ADD COMMENT
Topic
Name
4+4 =