summaryrefslogtreecommitdiffstats
path: root/src/widgets/graphicsview/qgraphicsproxywidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/graphicsview/qgraphicsproxywidget.cpp')
-rw-r--r--src/widgets/graphicsview/qgraphicsproxywidget.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/widgets/graphicsview/qgraphicsproxywidget.cpp b/src/widgets/graphicsview/qgraphicsproxywidget.cpp
index cb19b32763..84a8c979f6 100644
--- a/src/widgets/graphicsview/qgraphicsproxywidget.cpp
+++ b/src/widgets/graphicsview/qgraphicsproxywidget.cpp
@@ -920,16 +920,17 @@ bool QGraphicsProxyWidget::event(QEvent *event)
case QEvent::TouchBegin:
case QEvent::TouchUpdate:
case QEvent::TouchEnd: {
- if (event->spontaneous())
- qt_sendSpontaneousEvent(d->widget, event);
- else
- QCoreApplication::sendEvent(d->widget, event);
-
- if (event->isAccepted())
+ QTouchEvent *touchEvent = static_cast<QTouchEvent *>(event);
+ auto touchPoints = touchEvent->points();
+ bool res = QApplicationPrivate::translateRawTouchEvent(d->widget, touchEvent->pointingDevice(),
+ touchPoints, touchEvent->timestamp(),
+ event->spontaneous());
+ if (res) {
+ event->accept();
return true;
-
+ }
break;
- }
+ }
default:
break;
}