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>
This commit is contained in:
Sona Kurazyan 2019-08-26 13:58:49 +02:00
parent b84c4ddddf
commit 57ba04b0f0
1 changed files with 1 additions and 1 deletions

View File

@ -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;