I am looking for a workaround to display coordinates in a label on my widget whenever mouse hovers on "mapGraphicsView" but it only works when i click and drag it besides it doesn't work, is there any way to do it by just hovering over the map and get coordinates as i am using geometry editor to draw a ployline and i need coordinates to always display when i draw a point on map.
m_mapView->setMouseTracking(true);
connect(m_mapView, &MapGraphicsView::mouseMoved, this, [](QMouseEvent &mouseEvent)
{
qDebug() << mouseEvent.pos().x() << mouseEvent.pos().y();
});
or any overriden event like this
void mouseMoveEvent(QMouseEvent *event);