summaryrefslogtreecommitdiffstats
path: root/examples/gestures
diff options
context:
space:
mode:
Diffstat (limited to 'examples/gestures')
-rw-r--r--examples/gestures/graphicsview/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/gestures/graphicsview/main.cpp b/examples/gestures/graphicsview/main.cpp
index a0236ef..250da06 100644
--- a/examples/gestures/graphicsview/main.cpp
+++ b/examples/gestures/graphicsview/main.cpp
@@ -53,7 +53,7 @@ protected:
{
if (event->type() == QEvent::Gesture) {
QGestureEvent *ge = static_cast<QGestureEvent*>(event);
- if (const QGesture *g = ge->gesture(Qt::Pan)) {
+ if (const QPannableGesture *g = dynamic_cast<const QPannableGesture*>(ge->gesture(Qt::Pan))) {
QPoint pt = g->pos() - g->lastPos();
horizontalScrollBar()->setValue(horizontalScrollBar()->value() - pt.x());
verticalScrollBar()->setValue(verticalScrollBar()->value() - pt.y());