Hey,

that was also my first consideration, but after having a look in QWidget::event, i found this:

Qt Code:
  1. ....
  2.  
  3. case QEvent::TouchBegin:
  4. case QEvent::TouchUpdate:
  5. case QEvent::TouchEnd:
  6. {
  7. #ifndef Q_WS_MAC
  8. QTouchEvent *touchEvent = static_cast<QTouchEvent *>(event);
  9. const QTouchEvent::TouchPoint &touchPoint = touchEvent->touchPoints().first();
  10. if (touchPoint.isPrimary() || touchEvent->deviceType() == QTouchEvent::TouchPad)
  11. break;
  12.  
  13. // fake a mouse event!
  14. QEvent::Type eventType = QEvent::None;
  15. switch (touchEvent->type()) {
  16. case QEvent::TouchBegin:
  17. eventType = QEvent::MouseButtonPress;
  18. break;
  19. case QEvent::TouchUpdate:
  20. eventType = QEvent::MouseMove;
  21. break;
  22. case QEvent::TouchEnd:
  23. eventType = QEvent::MouseButtonRelease;
  24. break;
  25. default:
  26. Q_ASSERT(!true);
  27. break;
  28. }
  29. if (eventType == QEvent::None)
  30. break;
  31.  
  32. QMouseEvent mouseEvent(eventType,
  33. touchPoint.pos().toPoint(),
  34. touchPoint.screenPos().toPoint(),
  35. Qt::LeftButton,
  36. Qt::LeftButton,
  37. touchEvent->modifiers());
  38. (void) QApplication::sendEvent(this, &mouseEvent);
  39. #endif // Q_WS_MAC
  40. break;
  41.  
  42. ...
To copy to clipboard, switch view to plain text mode 

I am on Windows7 with QT 4.8.3! Dont know if it changed later on, but in this case the mouse event gets generated inside QWidget.
Are my considerations wrong? Where is the mousevent generated?

Any suggestions?