diff options
author | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2010-11-10 10:28:36 (GMT) |
---|---|---|
committer | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2010-11-11 09:58:53 (GMT) |
commit | 9022b0e50cac244790463905511ae5a868be3526 (patch) | |
tree | 0a661bdc22b99c50b943070f4023edb31429bc19 /doc | |
parent | 661c9f93a90a8855c4dd8b6a215312387387ee9c (diff) | |
download | Qt-9022b0e50cac244790463905511ae5a868be3526.zip Qt-9022b0e50cac244790463905511ae5a868be3526.tar.gz Qt-9022b0e50cac244790463905511ae5a868be3526.tar.bz2 |
Added an example for QTest::touchEvent to the documentation.
Reviewed-by: trustme
Diffstat (limited to 'doc')
-rw-r--r-- | doc/src/snippets/code/src_qtestlib_qtestcase.cpp | 16 |
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] + } |