summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/code/src_qtestlib_qtestcase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/snippets/code/src_qtestlib_qtestcase.cpp')
-rw-r--r--doc/src/snippets/code/src_qtestlib_qtestcase.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/src/snippets/code/src_qtestlib_qtestcase.cpp b/doc/src/snippets/code/src_qtestlib_qtestcase.cpp
index 6ae8939..adb0c34 100644
--- a/doc/src/snippets/code/src_qtestlib_qtestcase.cpp
+++ b/doc/src/snippets/code/src_qtestlib_qtestcase.cpp
@@ -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]
+
}