Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
4.8.5, 5.1.1, 5.4.0
-
Windows 8
Description
Use application below to reproduce the issue.
main.cpp
#include <QApplication> #include <QWidget> #include <QDebug> class Widget : public QWidget { public: Widget(QString name) { setObjectName(name); setWindowTitle(name); setAttribute(Qt::WA_AcceptTouchEvents); } virtual bool event(QEvent *event) { if ( event->type() == QEvent::TouchBegin ) { qDebug() << objectName() << "QEvent::TouchBegin"; event->setAccepted(true); return true; } else if ( event->type() == QEvent::TouchEnd ) qDebug() << objectName() << "QEvent::TouchEnd"; else if ( event->type() == QEvent::MouseButtonPress ) qDebug() << objectName() << "QEvent::MouseButtonPress"; else if ( event->type() == QEvent::MouseButtonRelease ) qDebug() << objectName() << "QEvent::MouseButtonRelease"; return QWidget::event(event); } }; int main(int argc, char **argv) { QApplication app(argc, argv); Widget w("Widget 1"); w.show(); Widget w2("Widget 2"); w2.show(); return app.exec(); }
Application creates two separated widgets.
Position them side by side.
Press and hold the left window with one finger.
Press and hold the right window with the second finger.
In the console window you see that both windows receive a TouchBegin event.
Now release the left finger and you see also the TouchEnd event.
The bug comes now: release the right finger and you get NO TouchEnd event!