Hi,

I'm handling TapAndHoldGesture in my Qt Application (version 4.7.4), the gesture is correctly fired and I handle it in the following way:

Qt Code:
  1. bool RecipeList::event(QEvent *event)
  2. {
  3. if (event->type() == QEvent::Gesture) {
  4. return gestureEvent(static_cast<QGestureEvent*>(event));
  5. }
  6. return QWidget::event(event);
  7. }
  8.  
  9. bool RecipeList::gestureEvent(QGestureEvent *event)
  10. {
  11. if (QGesture *swipe = event->gesture(Qt::SwipeGesture))
  12. swipeTriggered(static_cast<QSwipeGesture*>(swipe));
  13. else if (QGesture *tapAndHold = event->gesture(Qt::TapAndHoldGesture))
  14. tapAndHoldTriggered(static_cast<QTapAndHoldGesture*>(tapAndHold));
  15. return true;
  16. }
  17.  
  18. void RecipeList::tapAndHoldTriggered(QTapAndHoldGesture* tapAndHold)
  19. {
  20. if (tapAndHold->state() == Qt::GestureFinished) {
  21. QLOG_DEBUG() << Q_FUNC_INFO;
  22. }
  23. }
To copy to clipboard, switch view to plain text mode 

I need to extract the event sender object name, I tried sender()->objectName() but it fails.
How can I make it work?

Thanks

Giovanni