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