diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-08-26 13:58:49 +0200 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-08-26 14:35:12 +0200 |
commit | 57ba04b0f08fc2ae8654ad9aa7986e25edb4c2c3 (patch) | |
tree | efdd34971e325156dc193047153c614a7ea661b5 /examples | |
parent | b84c4ddddfacf624f73a67cc404e3b4c4b819ab5 (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>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/datavisualization/texturesurface/custominputhandler.cpp | 2 |
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; |