Hi! I'm trying to enable a swipe gesture. I created a test class like this following the documentation and the example:

Qt Code:
  1. GestureLabel::GestureLabel(QWidget *parent) :
  2. QWidget(parent)
  3. {
  4. grabGesture(Qt::SwipeGesture);
  5. }
  6.  
  7. bool GestureLabel::event(QEvent *e)
  8. {
  9. if (e->type() == QEvent::Gesture)
  10. return gestureEvent(static_cast<QGestureEvent*>(e));
  11. return QWidget::event(e);
  12. }
  13.  
  14. bool GestureLabel::gestureEvent(QGestureEvent *event)
  15. {
  16. if (QGesture *swipe = event->gesture(Qt::SwipeGesture))
  17. swipeTriggered(static_cast<QSwipeGesture *>(swipe));
  18. return true;
  19. }
  20.  
  21. void GestureLabel::swipeTriggered(QSwipeGesture *gesture)
  22. {
  23. QMessageBox::information(this, "Gesture!", "Gesture!");
  24. }
To copy to clipboard, switch view to plain text mode 

Seems not to recognize swipes. I tried to put a breakpoint in line:

Qt Code:
  1. return gestureEvent(static_cast<QGestureEvent*>(e));
To copy to clipboard, switch view to plain text mode 

and seems the execution doesn't stop there. Is there anything I'm doing wrong? Am I lacking anything?
Thanks for any advice!