mirror of https://github.com/qt/qtdatavis3d.git
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:
parent
b84c4ddddf
commit
57ba04b0f0
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue