diff options
Diffstat (limited to 'examples/gestures')
-rw-r--r-- | examples/gestures/imageviewer/imagewidget.cpp | 9 | ||||
-rw-r--r-- | examples/gestures/imageviewer/tapandholdgesture.cpp | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/examples/gestures/imageviewer/imagewidget.cpp b/examples/gestures/imageviewer/imagewidget.cpp index 1285e9ae4e..7d06303995 100644 --- a/examples/gestures/imageviewer/imagewidget.cpp +++ b/examples/gestures/imageviewer/imagewidget.cpp @@ -63,11 +63,14 @@ ImageWidget::ImageWidget(QWidget *parent) verticalOffset = 0; panGesture = new QPanGesture(this); + connect(panGesture, SIGNAL(started()), this, SLOT(gestureTriggered())); + connect(panGesture, SIGNAL(finished()), this, SLOT(gestureTriggered())); + connect(panGesture, SIGNAL(cancelled()), this, SLOT(gestureTriggered())); connect(panGesture, SIGNAL(triggered()), this, SLOT(gestureTriggered())); - tapAndHoldGesture = new TapAndHoldGesture(this); - connect(tapAndHoldGesture, SIGNAL(triggered()), this, SLOT(gestureTriggered())); - connect(tapAndHoldGesture, SIGNAL(finished()), this, SLOT(gestureTriggered())); +// tapAndHoldGesture = new TapAndHoldGesture(this); +// connect(tapAndHoldGesture, SIGNAL(triggered()), this, SLOT(gestureTriggered())); +// connect(tapAndHoldGesture, SIGNAL(finished()), this, SLOT(gestureTriggered())); } void ImageWidget::paintEvent(QPaintEvent*) diff --git a/examples/gestures/imageviewer/tapandholdgesture.cpp b/examples/gestures/imageviewer/tapandholdgesture.cpp index 27458ce92a..fffe10f610 100644 --- a/examples/gestures/imageviewer/tapandholdgesture.cpp +++ b/examples/gestures/imageviewer/tapandholdgesture.cpp @@ -72,8 +72,6 @@ TapAndHoldGesture::TapAndHoldGesture(QWidget *parent) /*! \internal */ bool TapAndHoldGesture::filterEvent(QEvent *event) { - if (!event->spontaneous()) - return false; const QTouchEvent *ev = static_cast<const QTouchEvent*>(event); switch (event->type()) { case QEvent::TouchBegin: { |