diff --git a/visualizer/main.cpp b/visualizer/main.cpp index ea0a7eb..eafe766 100644 --- a/visualizer/main.cpp +++ b/visualizer/main.cpp @@ -455,12 +455,12 @@ public slots: void wheelEvent(QWheelEvent* event) { const double newScale = - m_scale * std::max(0.3, (1. + event->delta() * 8e-4)); + m_scale * std::max(0.3, (1. + event->angleDelta().y() * 8e-4)); if(m_scale == newScale) { return; } - const QPointF cursor = event->posF(); + const QPointF cursor = event->position(); const QPointF scenePt = screenToScene(cursor); const QPointF screenCenter = QPointF(width(), height()) / 2.0; m_translation = cursor - newScale * QPointF(scenePt.x(), -scenePt.y()) -