From 7ca9b86c7858b828070d852c8a070f93434acc54 Mon Sep 17 00:00:00 2001 From: Sona Kurazyan Date: Fri, 9 Aug 2019 16:47:32 +0200 Subject: Remove the usage of deprecated QWheelEvent::pos Task-number: QTBUG-76491 Change-Id: I5831525f8ac4bf0cbec6a52a434b1d8c3b388b80 Reviewed-by: Volker Hilsheimer --- src/datavisualization/input/q3dinputhandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/datavisualization/input/q3dinputhandler.cpp b/src/datavisualization/input/q3dinputhandler.cpp index 5e6f10af..3d5dd059 100644 --- a/src/datavisualization/input/q3dinputhandler.cpp +++ b/src/datavisualization/input/q3dinputhandler.cpp @@ -262,7 +262,7 @@ void Q3DInputHandler::wheelEvent(QWheelEvent *event) zoomLevel = qBound(minZoomLevel, zoomLevel, maxZoomLevel); if (isZoomAtTargetEnabled()) { - scene()->setGraphPositionQuery(event->pos()); + scene()->setGraphPositionQuery(event->position().toPoint()); d_ptr->m_zoomAtTargetPending = true; // If zoom at target is enabled, we don't want to zoom yet, as that causes // jitter. Instead, we zoom next frame, when we apply the camera position. -- cgit v1.2.3 From 57ba04b0f08fc2ae8654ad9aa7986e25edb4c2c3 Mon Sep 17 00:00:00 2001 From: Sona Kurazyan Date: Mon, 26 Aug 2019 13:58:49 +0200 Subject: Replace the deprecated QWheelEvent::delta() -> QWheelEvent::angleDelta() Replaced the deprecated QWheelEvent::delta() with the vertical component of angle delta, assuming that it's acceptable to have a single-dimension mouse wheel in the example code. Task-number: QTBUG-76491 Change-Id: Ie05bb5934ce43976cd3cf009343d7b50ea327f14 Reviewed-by: Shawn Rutledge --- examples/datavisualization/texturesurface/custominputhandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/datavisualization/texturesurface/custominputhandler.cpp b/examples/datavisualization/texturesurface/custominputhandler.cpp index 07608c90..e8e693a0 100644 --- a/examples/datavisualization/texturesurface/custominputhandler.cpp +++ b/examples/datavisualization/texturesurface/custominputhandler.cpp @@ -58,7 +58,7 @@ void CustomInputHandler::mousePressEvent(QMouseEvent *event, const QPoint &mouse //! [1] void CustomInputHandler::wheelEvent(QWheelEvent *event) { - float delta = float(event->delta()); + float delta = float(event->angleDelta().y()); m_axisXMinValue += delta; m_axisXMaxValue -= delta; -- cgit v1.2.3