diff options
author | Liang Qi <liang.qi@qt.io> | 2018-02-16 08:54:58 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2018-02-16 08:54:58 +0100 |
commit | 942ab490724fcc9544e786e5783718e1a07aa50b (patch) | |
tree | feb7d3ff716edb37b2ca60e33c05adf8777bd964 /src/widgets/graphicsview | |
parent | 0fb8271a467202990c90321066e40faed640a7a8 (diff) | |
parent | 24adaa9a742e6f95ff897d0eb9a2bce0527dd042 (diff) |
Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
src/corelib/tools/tools.pri
Change-Id: I705630f9cecbf0ce51a22fc6116b8c49611259e9
Diffstat (limited to 'src/widgets/graphicsview')
-rw-r--r-- | src/widgets/graphicsview/qgraphicsview.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/widgets/graphicsview/qgraphicsview.cpp b/src/widgets/graphicsview/qgraphicsview.cpp index 1cc8543fdd..0c847b899e 100644 --- a/src/widgets/graphicsview/qgraphicsview.cpp +++ b/src/widgets/graphicsview/qgraphicsview.cpp @@ -313,13 +313,15 @@ void QGraphicsViewPrivate::translateTouchEvent(QGraphicsViewPrivate *d, QTouchEv QList<QTouchEvent::TouchPoint> touchPoints = touchEvent->touchPoints(); for (int i = 0; i < touchPoints.count(); ++i) { QTouchEvent::TouchPoint &touchPoint = touchPoints[i]; + const QSizeF ellipseDiameters = touchPoint.ellipseDiameters(); // the scene will set the item local pos, startPos, lastPos, and rect before delivering to // an item, but for now those functions are returning the view's local coordinates - touchPoint.setSceneRect(d->mapToScene(touchPoint.rect())); + touchPoint.setScenePos(d->mapToScene(touchPoint.pos())); touchPoint.setStartScenePos(d->mapToScene(touchPoint.startPos())); touchPoint.setLastScenePos(d->mapToScene(touchPoint.lastPos())); + touchPoint.setEllipseDiameters(ellipseDiameters); - // screenPos, startScreenPos, lastScreenPos, and screenRect are already set + // screenPos, startScreenPos, and lastScreenPos are already set } touchEvent->setTouchPoints(touchPoints); |