[solved] graphicsView Mouse position and click.
-
Hi all.
I am looking for a way that i can get the mouse position when clicked in a graphicsView.
i tryed in the Dialog to add the @mousePressEvent(QGraphicsSceneMouseEvent *ev);@
but that did not react to a mouse click.but when i use @mousePressEvent(QMouseEvent *ev);@ then it works but it wil retun the mouse position from the Dialog window and not only the graphicsView.
I need some fresh ideas on how to get the X and Y from the graphicsView.
Thanx in advanced.
-
Hi,
There's something unclear: What is your dialog doing ?
-
Do you mean that you open a dialog from your mainwindow ?
-
Same to you
Then you have to subclass the QGraphicsView if you want to have that information from it or use an event filter.
-
You're welcome !
Since you have your mouse events working correctly, please update the thread title prepending [solved] so other forum viewers may know a solution has been found :)