TouchEventSequence QML Type
TouchEventSequence는 테스트를 위해 터치 이벤트를 생성하고 전달하는 데 사용됩니다. 더 보기...
| Import Statement: | import QtTest |
메서드
- TouchEventSequence commit()
- TouchEventSequence move(int touchId, object item, real x, real y)
- TouchEventSequence press(int touchId, object item, real x, real y)
- TouchEventSequence release(int touchId, object item, real x, real y)
- TouchEventSequence stationary(int touchId)
상세 설명
TouchEventSequence는 ` TestCase.touchEvent()`를 호출하여 생성됩니다. 이 타입은 직접 인스턴스화할 수 없습니다. 이 타입이 제공하는 각 메서드는 동일한 객체를 반환하므로, 메서드 체인 호출이 가능합니다.
예를 들어:
touchEvent(item).press(0).commit();다음과 동일합니다:
var sequence = touchEvent(item);
sequence.press(0);
sequence.commit();이벤트는 touchEvent에 지정된 항목이 포함된 창으로 전달됩니다.
TestCase::touchEvent()도 참조하십시오 .
메서드 문서
TouchEventSequence commit()
press(), move(), release(), stationary()을 미리 사용하여 구성된 터치 이벤트를 전송합니다. commit이 반환된 후에는 TouchEventSequence 를 사용하여 새로운 이벤트를 구성할 수 있습니다.
var sequence = touchEvent(target);
// Touch the middle of target with 1 point
sequence.press(1);
sequence.commit();
// Begin a new event
// Move the point to target's upper left corner
sequence.move(1, target, 0, 0);
sequence.commit();TouchEventSequence 객체가 소멸되면 커밋이 자동으로 호출됩니다.
TouchEventSequence move(int touchId, object item, real x = item.width / 2, real y = item.height / 2)
touchId 를 item 를 기준으로 x 및 y 가 가리키는 지점으로 이동합니다.
항목은 touchEvent()를 통해 제공된 값을 기본값으로 사용합니다. X와 y는 항목의 중심점을 기본값으로 합니다.
TouchEventSequence press(int touchId, object item, real x = item.width / 2, real y = item.height / 2)
` touchId`로 식별되는 새로운 터치 포인트를 생성하며, 이 포인트는 ` item`를 기준으로 ` x ` 및 ` y `가 가리키는 위치에 생성됩니다. 동일한 터치 지점을 다시 사용할 경우 동일한 `touchId`가 유지되어야 합니다.
Item은 touchEvent()를 통해 제공된 값을 기본값으로 사용합니다. X와 y는 항목의 중심점을 기본값으로 합니다.
TouchEventSequence release(int touchId, object item, real x = item.width / 2, real y = item.height / 2)
item 를 기준으로 x 및 y 가 가리키는 지점에서 touchId 를 제거합니다.
항목의 기본값은 touchEvent()를 통해 제공된 값입니다. X와 y의 기본값은 항목의 중심점입니다.
TouchEventSequence stationary(int touchId)
touchId 가 존재하지만, 그 외에는 이전 이벤트와 변함이 없음을 나타냅니다.
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.