diff --git a/examples/widgets/gestures/imagegestures/imagegestures.pro b/examples/widgets/gestures/imagegestures/imagegestures.pro
index 0d5b2f2..712bbec 100644
--- a/examples/widgets/gestures/imagegestures/imagegestures.pro
+++ b/examples/widgets/gestures/imagegestures/imagegestures.pro
@@ -10,3 +10,4 @@ SOURCES   = imagewidget.cpp \
 target.path = $$[QT_INSTALL_EXAMPLES]/widgets/gestures/imagegestures
 INSTALLS += target
 
+CONFIG+=console
diff --git a/examples/widgets/gestures/imagegestures/main.cpp b/examples/widgets/gestures/imagegestures/main.cpp
index 80f275b..3f0513e 100644
--- a/examples/widgets/gestures/imagegestures/main.cpp
+++ b/examples/widgets/gestures/imagegestures/main.cpp
@@ -61,6 +61,9 @@ int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);
     QCoreApplication::setApplicationVersion(QT_VERSION_STR);
+    QStringList args = QCoreApplication::arguments();
+    args.pop_front();
+    qDebug() << QT_VERSION_STR << args;
     QCoreApplication::setApplicationName(QStringLiteral("imagegestures"));
     QGuiApplication::setApplicationDisplayName(QStringLiteral("Image Gestures Example"));
 
diff --git a/src/widgets/kernel/qstandardgestures.cpp b/src/widgets/kernel/qstandardgestures.cpp
index e57c328..582ed07 100644
--- a/src/widgets/kernel/qstandardgestures.cpp
+++ b/src/widgets/kernel/qstandardgestures.cpp
@@ -286,16 +286,18 @@ QGestureRecognizer::Result QSwipeGestureRecognizer::recognize(QGesture *state,
     QSwipeGesturePrivate *d = q->d_func();
 
     QGestureRecognizer::Result result = QGestureRecognizer::Ignore;
-
     switch (event->type()) {
     case QEvent::TouchBegin: {
+        const QTouchEvent *ev = static_cast<const QTouchEvent *>(event);
         d->velocityValue = 1;
         d->time.start();
+        qDebug() <<__FUNCTION__ <<  event << "start with " <<  ev->touchPoints().size();
         d->started = true;
         result = QGestureRecognizer::MayBeGesture;
         break;
     }
     case QEvent::TouchEnd: {
+        qDebug() <<__FUNCTION__ <<  event << "end , state=" << q->state();
         if (q->state() != Qt::NoGesture) {
             result = QGestureRecognizer::FinishGesture;
         } else {
@@ -305,6 +307,7 @@ QGestureRecognizer::Result QSwipeGestureRecognizer::recognize(QGesture *state,
     }
     case QEvent::TouchUpdate: {
         const QTouchEvent *ev = static_cast<const QTouchEvent *>(event);
+        qDebug() <<__FUNCTION__ <<  "upd" << ev->touchPoints().size() << "started" << d->started;
         if (!d->started)
             result = QGestureRecognizer::CancelGesture;
         else if (ev->touchPoints().size() == 3) {
@@ -335,6 +338,7 @@ QGestureRecognizer::Result QSwipeGestureRecognizer::recognize(QGesture *state,
             d->swipeAngle = QLineF(p1.startScreenPos(), p1.screenPos()).angle();
 
             static const int MoveThreshold = 50;
+            qDebug() <<__FUNCTION__ <<  "Distance check" << xDistance << yDistance;
             if (xDistance > MoveThreshold || yDistance > MoveThreshold) {
                 // measure the distance to check if the direction changed
                 d->lastPositions[0] = p1.screenPos().toPoint();
@@ -354,16 +358,19 @@ QGestureRecognizer::Result QSwipeGestureRecognizer::recognize(QGesture *state,
                 }
                 result = QGestureRecognizer::TriggerGesture;
             } else {
+                qDebug() <<__FUNCTION__ <<  "Distance MISMATCH";
                 if (q->state() != Qt::NoGesture)
                     result = QGestureRecognizer::TriggerGesture;
                 else
                     result = QGestureRecognizer::MayBeGesture;
             }
         } else if (ev->touchPoints().size() > 3) {
+            qDebug() <<__FUNCTION__ <<  "Too many";
             result = QGestureRecognizer::CancelGesture;
         } else { // less than 3 touch points
+            qDebug() <<__FUNCTION__ <<  "Too few, pressed=" << (ev->touchPointStates() & Qt::TouchPointPressed);
             if (d->started && (ev->touchPointStates() & Qt::TouchPointPressed))
-                result = QGestureRecognizer::CancelGesture;
+              result = QGestureRecognizer::CancelGesture;
             else if (d->started)
                 result = QGestureRecognizer::Ignore;
             else
@@ -379,6 +386,7 @@ QGestureRecognizer::Result QSwipeGestureRecognizer::recognize(QGesture *state,
 
 void QSwipeGestureRecognizer::reset(QGesture *state)
 {
+     qDebug() <<__FUNCTION__ ;
     QSwipeGesture *q = static_cast<QSwipeGesture *>(state);
     QSwipeGesturePrivate *d = q->d_func();
 
