diff options
Diffstat (limited to 'src/quicktemplates2/qquickswitchdelegate.cpp')
-rw-r--r-- | src/quicktemplates2/qquickswitchdelegate.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/quicktemplates2/qquickswitchdelegate.cpp b/src/quicktemplates2/qquickswitchdelegate.cpp index d0e3afc8..2e196412 100644 --- a/src/quicktemplates2/qquickswitchdelegate.cpp +++ b/src/quicktemplates2/qquickswitchdelegate.cpp @@ -177,7 +177,7 @@ void QQuickSwitchDelegate::mouseMoveEvent(QMouseEvent *event) { Q_D(QQuickSwitchDelegate); if (!keepMouseGrab()) { - const QPointF movePoint = event->localPos(); + const QPointF movePoint = event->position(); if (d->canDrag(movePoint)) setKeepMouseGrab(QQuickWindowPrivate::dragOverThreshold(movePoint.x() - d->pressPoint.x(), Qt::XAxis, event)); } @@ -190,10 +190,10 @@ void QQuickSwitchDelegate::touchEvent(QTouchEvent *event) Q_D(QQuickSwitchDelegate); if (!keepTouchGrab() && event->type() == QEvent::TouchUpdate) { for (const QTouchEvent::TouchPoint &point : event->touchPoints()) { - if (point.id() != d->touchId || point.state() != Qt::TouchPointMoved) + if (point.id() != d->touchId || point.state() != QEventPoint::Updated) continue; - if (d->canDrag(point.pos())) - setKeepTouchGrab(QQuickWindowPrivate::dragOverThreshold(point.pos().x() - d->pressPoint.x(), Qt::XAxis, &point)); + if (d->canDrag(point.position())) + setKeepTouchGrab(QQuickWindowPrivate::dragOverThreshold(point.position().x() - d->pressPoint.x(), Qt::XAxis, &point)); } } QQuickItemDelegate::touchEvent(event); |