Using QGraphicsSceneMouseEvent
Hi..
i would like to use the QGraphicsSceneMouseEvent for My application To get The coordinate of the mouse at The GraphicsView ( which contains the GraphicsScene)..
I tried t create my own Class scene that inherit from QGraphicScene to implement the virtual mouse methods ..
void midoscene::mousePressEvent(QGraphicsSceneMouseEven t *e){
point+=e->scenePos(); //QPointF point(0,0)
//...
}
but the problem is that i should write the coordinate of mouse on a label in the mainWidget tht contain the scene ..
please if someone could show how to use that methode to return the mouse coordinates ..
thanks !!!
Re: Using QGraphicsSceneMouseEvent
emit a custom signal and connect it to a slot in the label or elsewhere (depending on the signature).
Re: Using QGraphicsSceneMouseEvent
Or you can install a filter on mainwindow and convert the mouse cordinates to scene cordinates and display them status bar or whereever u want.