Just remove the mouse grab. The elements will react to this and
correct their state.
Change-Id: I8b91295606eaface54aa95b1500e7b138d9bc82e
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
void QQuickCanvasPrivate::translateTouchToMouse(QTouchEvent *event)
{
+ if (event->type() == QEvent::TouchCancel) {
+ touchMouseId = -1;
+ if (!mouseGrabberItem)
+ return;
+ mouseGrabberItem->ungrabMouse();
+ mouseGrabberItem = 0;
+ return;
+ }
for (int i = 0; i < event->touchPoints().count(); ++i) {
QTouchEvent::TouchPoint p = event->touchPoints().at(i);
if (touchMouseId == -1 && p.state() & Qt::TouchPointPressed) {