summaryrefslogtreecommitdiffstats
path: root/examples/embedded/raycasting
diff options
context:
space:
mode:
Diffstat (limited to 'examples/embedded/raycasting')
-rw-r--r--examples/embedded/raycasting/raycasting.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/embedded/raycasting/raycasting.cpp b/examples/embedded/raycasting/raycasting.cpp
index c0a1e48fa6..19e3c8b271 100644
--- a/examples/embedded/raycasting/raycasting.cpp
+++ b/examples/embedded/raycasting/raycasting.cpp
@@ -336,15 +336,15 @@ protected:
}
void mousePressEvent(QMouseEvent *event) {
- qreal dx = centerPad.x() - event->pos().x();
- qreal dy = centerPad.y() - event->pos().y();
+ qreal dx = centerPad.x() - event->position().toPoint().x();
+ qreal dy = centerPad.y() - event->position().toPoint().y();
angleDelta = dx * 2 * M_PI / width();
moveDelta = dy * 10 / height();
}
void mouseMoveEvent(QMouseEvent *event) {
- qreal dx = centerPad.x() - event->pos().x();
- qreal dy = centerPad.y() - event->pos().y();
+ qreal dx = centerPad.x() - event->position().toPoint().x();
+ qreal dy = centerPad.y() - event->position().toPoint().y();
angleDelta = dx * 2 * M_PI / width();
moveDelta = dy * 10 / height();
}