diff options
Diffstat (limited to 'doc/src/snippets/code/src_qtestlib_qtestcase.cpp')
-rw-r--r-- | doc/src/snippets/code/src_qtestlib_qtestcase.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/doc/src/snippets/code/src_qtestlib_qtestcase.cpp b/doc/src/snippets/code/src_qtestlib_qtestcase.cpp index c9bda61..adb0c34 100644 --- a/doc/src/snippets/code/src_qtestlib_qtestcase.cpp +++ b/doc/src/snippets/code/src_qtestlib_qtestcase.cpp @@ -48,7 +48,7 @@ QVERIFY(1 + 1 == 2); //! [1] -QVERIFY2(1 + 1 == 2, "A breach in basic arithmetic occured."); +QVERIFY2(1 + 1 == 2, "A breach in basic arithmetic occurred."); //! [1] @@ -230,5 +230,21 @@ widget.show(); QTest::qWaitForWindowShown(&widget); //! [24] +//! [25] +QWidget widget; + +QTest::touchEvent(&widget) + .press(0, QPoint(10, 10)); +QTest::touchEvent(&widget) + .stationary(0) + .press(1, QPoint(40, 10)); +QTest::touchEvent(&widget) + .move(0, QPoint(12, 12)) + .move(1, QPoint(45, 5)); +QTest::touchEvent(&widget) + .release(0) + .release(1); +//! [25] + } |