diff options
author | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2009-02-26 16:18:33 (GMT) |
---|---|---|
committer | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2009-05-11 13:38:55 (GMT) |
commit | aa4334b77702d99d4aa3da853dd66104eb4a8123 (patch) | |
tree | 2657a323cade43b263186719327a6ac16df9b43d /examples | |
parent | a3d8cfb1ee89e0600add864db53d67552820b95a (diff) | |
download | Qt-aa4334b77702d99d4aa3da853dd66104eb4a8123.zip Qt-aa4334b77702d99d4aa3da853dd66104eb4a8123.tar.gz Qt-aa4334b77702d99d4aa3da853dd66104eb4a8123.tar.bz2 |
Fixed lastDirection in the Pan gesture.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/gestures/graphicsview/main.cpp | 2 |
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()); |