|  | Home · All Classes · Modules

# QTest.QTouchEventSequence Class Reference
[QtTest module]

The QTouchEventSequence class is used to simulate a sequence of touch events. More...

### Methods

- QTouchEventSequence move (self, int, QPoint, QWidget widget = None)
- QTouchEventSequence press (self, int, QPoint, QWidget widget = None)
- QTouchEventSequence release (self, int, QPoint, QWidget widget = None)
- QTouchEventSequence stationary (self, int)

## Detailed Description

The QTouchEventSequence class is used to simulate a sequence of touch events.

To simulate a sequence of touch events on a specific device for a widget, call QTest.touchEvent to create a QTouchEventSequence instance. Add touch events to the sequence by calling press(), move(), release() and stationary(), and let the instance run out of scope to commit the sequence to the event system.

## Method Documentation

### QTouchEventSequence QTouchEventSequence.move (self, int, QPoint, QWidget widget = None)

Adds a move event for touchpoint touchId at position pt to this sequence and returns a reference to this QTouchEventSequence.

The position pt is interpreted as relative to widget. If widget is the null pointer, then pt is interpreted as relative to the widget provided when instantiating this QTouchEventSequence.

Simulates that the user moved the finger identified by touchId.

### QTouchEventSequence QTouchEventSequence.press (self, int, QPoint, QWidget widget = None)

Adds a press event for touchpoint touchId at position pt to this sequence and returns a reference to this QTouchEventSequence.

The position pt is interpreted as relative to widget. If widget is the null pointer, then pt is interpreted as relative to the widget provided when instantiating this QTouchEventSequence.

Simulates that the user pressed the touch screen or pad with the finger identified by touchId.

### QTouchEventSequence QTouchEventSequence.release (self, int, QPoint, QWidget widget = None)

Adds a release event for touchpoint touchId at position pt to this sequence and returns a reference to this QTouchEventSequence.

The position pt is interpreted as relative to widget. If widget is the null pointer, then pt is interpreted as relative to the widget provided when instantiating this QTouchEventSequence.

Simulates that the user lifted the finger identified by touchId.

### QTouchEventSequence QTouchEventSequence.stationary (self, int)

Adds a stationary event for touchpoint touchId to this sequence and returns a reference to this QTouchEventSequence.

Simulates that the user did not move the finger identified by touchId.