diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-06-08 10:44:39 (GMT) |
---|---|---|
committer | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-06-08 10:44:39 (GMT) |
commit | 52d9ce4ac87c6be1cdc9106ce359e58f7d791c00 (patch) | |
tree | 4780ed879bf356d46bd707f46d56f1b0df3c97c8 /tests/auto/qtouchevent | |
parent | be15f967163a0e92e517920278b648c2ffc25eb9 (diff) | |
download | Qt-52d9ce4ac87c6be1cdc9106ce359e58f7d791c00.zip Qt-52d9ce4ac87c6be1cdc9106ce359e58f7d791c00.tar.gz Qt-52d9ce4ac87c6be1cdc9106ce359e58f7d791c00.tar.bz2 |
test that TouchBegin events propagate through widgets with Qt::WA_AcceptTouchEvents
Diffstat (limited to 'tests/auto/qtouchevent')
-rw-r--r-- | tests/auto/qtouchevent/tst_qtouchevent.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/qtouchevent/tst_qtouchevent.cpp b/tests/auto/qtouchevent/tst_qtouchevent.cpp index 1550935..7a38d24 100644 --- a/tests/auto/qtouchevent/tst_qtouchevent.cpp +++ b/tests/auto/qtouchevent/tst_qtouchevent.cpp @@ -172,6 +172,21 @@ void tst_QTouchEvent::touchBeginPropagatesWhenIgnored() QVERIFY(grandchild.seenTouchBegin); QVERIFY(child.seenTouchBegin); QVERIFY(!window.seenTouchBegin); + + // disable touch on grandchild. even though it doesn't accept it, child should still get the + // TouchBegin + grandchild.reset(); + child.reset(); + window.reset(); + grandchild.setAttribute(Qt::WA_AcceptTouchEvents, false); + + touchEvent.ignore(); + res = QApplication::sendEvent(&grandchild, &touchEvent); + QVERIFY(res); + QVERIFY(touchEvent.isAccepted()); + QVERIFY(!grandchild.seenTouchBegin); + QVERIFY(child.seenTouchBegin); + QVERIFY(!window.seenTouchBegin); } void tst_QTouchEvent::touchUpdateAndEndNeverPropagate() |