bool doubleClick = event->timestamp() - touchMousePressTimestamp
< static_cast<ulong>(qApp->styleHints()->mouseDoubleClickInterval());
touchMousePressTimestamp = event->timestamp();
+ QQuickMouseEventEx me = touchToMouseEvent(QEvent::MouseButtonPress, p);
+ me.setTimestamp(event->timestamp());
+ me.setAccepted(false);
+ me.setCapabilities(event->device()->capabilities());
+ deliverMouseEvent(&me);
+ if (me.isAccepted()) {
+ touchMouseId = p.id();
+ event->setAccepted(true);
+ }
if (doubleClick) {
+ touchMousePressTimestamp = 0;
QQuickMouseEventEx me = touchToMouseEvent(QEvent::MouseButtonDblClick, p);
me.setTimestamp(event->timestamp());
me.setAccepted(false);
}
}
}
- QQuickMouseEventEx me = touchToMouseEvent(QEvent::MouseButtonPress, p);
- me.setTimestamp(event->timestamp());
- me.setAccepted(false);
- me.setCapabilities(event->device()->capabilities());
- deliverMouseEvent(&me);
- if (me.isAccepted()) {
- touchMouseId = p.id();
- event->setAccepted(true);
- }
if (touchMouseId != -1)
break;
} else if (p.id() == touchMouseId) {