Please nominate your Qt Champions for 2021! https://forum.qt.io/topic/132134/looking-for-the-2021-qt-champions
How to get absolute location of mouse click on widget?
Niagarer last edited by Niagarer
the widget is a QGraphicsView and it is able to zoom in it.
When I click with the mouse anywhere on this widget, I want to display a picture there.
The problem is, that I don't know how I can get the absolute location of the mouse on the widget.
This is a problem, because when I zoom in and click, I also want to spawn the picture exactely where the mouse was over the widget.
Thanks for answers
Are you thinking about something like the QGraphicsView::mapToScene method ?
Niagarer last edited by
Yes, this was exactely what I wanted.
StackOverflow gave me the answer just now.