summaryrefslogtreecommitdiffstats
path: root/tests/manual/gestures/graphicsview/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/gestures/graphicsview/main.cpp')
-rw-r--r--tests/manual/gestures/graphicsview/main.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/manual/gestures/graphicsview/main.cpp b/tests/manual/gestures/graphicsview/main.cpp
index de92afe..f8433b5 100644
--- a/tests/manual/gestures/graphicsview/main.cpp
+++ b/tests/manual/gestures/graphicsview/main.cpp
@@ -66,11 +66,11 @@ protected:
default: qDebug("view: Pan: <unknown state>"); break;
}
- const QPointF offset = pan->offset();
+ const QPointF delta = pan->delta();
QScrollBar *vbar = verticalScrollBar();
QScrollBar *hbar = horizontalScrollBar();
- vbar->setValue(vbar->value() - offset.y());
- hbar->setValue(hbar->value() - offset.x());
+ vbar->setValue(vbar->value() - delta.y());
+ hbar->setValue(hbar->value() - delta.x());
ge->accept(pan);
return true;
}
@@ -152,8 +152,8 @@ private:
MainWindow::MainWindow()
{
- (void)QApplication::registerGestureRecognizer(new MousePanGestureRecognizer);
- ThreeFingerSlideGesture::Type = QApplication::registerGestureRecognizer(new ThreeFingerSlideGestureRecognizer);
+ (void)QGestureRecognizer::registerRecognizer(new MousePanGestureRecognizer);
+ ThreeFingerSlideGesture::Type = QGestureRecognizer::registerRecognizer(new ThreeFingerSlideGestureRecognizer);
tabWidget = new QTabWidget;