Hi,
how can I perform a mouse press button by code into a QGraphicsView/QGraphicsScene?
I tried to create a QMouseEvent and execute a myView::QGraphicsMouseEvent(event) but it doesn't seem to work.
any other idea?
thanks!
Hi,
how can I perform a mouse press button by code into a QGraphicsView/QGraphicsScene?
I tried to create a QMouseEvent and execute a myView::QGraphicsMouseEvent(event) but it doesn't seem to work.
any other idea?
thanks!
Try sending event with QApplication::sendEvent
You need to set call QGraphicsView::mousePressEvent(event) at the end of yourView::mousePressEvent(event) method in order to catch it in the scene.I tried to create a QMouseEvent and execute a myView::QGraphicsMouseEvent(event) but it doesn't seem to work.
Bookmarks