summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSona Kurazyan <sona.kurazyan@qt.io>2019-08-26 13:58:49 +0200
committerSona Kurazyan <sona.kurazyan@qt.io>2019-08-26 14:35:12 +0200
commit57ba04b0f08fc2ae8654ad9aa7986e25edb4c2c3 (patch)
treeefdd34971e325156dc193047153c614a7ea661b5
parentb84c4ddddfacf624f73a67cc404e3b4c4b819ab5 (diff)
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 <shawn.rutledge@qt.io>
-rw-r--r--examples/datavisualization/texturesurface/custominputhandler.cpp2
1 files changed, 1 insertions, 1 deletions
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;