Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.13
-
None
-
3dde49e3e0278e2aaea7b255bc35a372c43fa0ac
Description
In the example given for TouchEventSequence at https://doc.qt.io/qt-5/qml-qttest-testcase.html#touchEvent-method, a correction is needed in 'when' property of TestCase{ }. Like TestCase should be executed when the window is shown meaning it is ready for touch actions.
Rectangle { width: 640; height: 480 MultiPointTouchArea { id: area anchors.fill: parent property bool touched: false onPressed: touched = true } TestCase { name: "ItemTests" // when: area.pressed ---> Should be changed to windowShown when: windowShown id: test1 function test_touch() { var touch = touchEvent(area); touch.press(0, area, 10, 10); touch.commit(); verify(area.touched); } } }