From 730bc064a070e886e10950ccfd59780e8976f5fd Mon Sep 17 00:00:00 2001 From: Marcel Krems Date: Sat, 31 Aug 2013 16:42:43 +0200 Subject: Forward QGraphicsView::mouseDoubleClickEvent Do the same as in mousePressEvent. Otherwise it is not possible to handle the event in one of the graphics views parents. Task-number: QTBUG-8061 Change-Id: I67c7635361a9ed595c513c28ea016e6253fa2101 Reviewed-by: Andreas Aardal Hanssen --- src/widgets/graphicsview/qgraphicsview.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/widgets/graphicsview/qgraphicsview.cpp b/src/widgets/graphicsview/qgraphicsview.cpp index 846858ab31..a39c084798 100644 --- a/src/widgets/graphicsview/qgraphicsview.cpp +++ b/src/widgets/graphicsview/qgraphicsview.cpp @@ -3221,6 +3221,13 @@ void QGraphicsView::mouseDoubleClickEvent(QMouseEvent *event) qt_sendSpontaneousEvent(d->scene, &mouseEvent); else QApplication::sendEvent(d->scene, &mouseEvent); + + // Update the original mouse event accepted state. + const bool isAccepted = mouseEvent.isAccepted(); + event->setAccepted(isAccepted); + + // Update the last mouse event accepted state. + d->lastMouseEvent.setAccepted(isAccepted); } /*! -- cgit v1.2.3