|  | Home · All Classes · Modules

# QTouchEvent.TouchPoint Class Reference
[QtGui module]

The TouchPoint class provides information about a touch point in a QTouchEvent. More...

### Methods

- int id (self)
- bool isPrimary (self)
- QPointF lastNormalizedPos (self)
- QPointF lastPos (self)
- QPointF lastScenePos (self)
- QPointF lastScreenPos (self)
- QPointF normalizedPos (self)
- QPointF pos (self)
- float pressure (self)
- QRectF rect (self)
- QPointF scenePos (self)
- QRectF sceneRect (self)
- QPointF screenPos (self)
- QRectF screenRect (self)
- QPointF startNormalizedPos (self)
- QPointF startPos (self)
- QPointF startScenePos (self)
- QPointF startScreenPos (self)
- Qt.TouchPointState state (self)

## Detailed Description

The TouchPoint class provides information about a touch point in a QTouchEvent.

## Method Documentation

### int TouchPoint.id (self)

Returns the id number of this touch point.

Id numbers are globally sequential, starting at zero, meaning the first touch point in the application has id 0, the second has id 1, and so on.

### bool TouchPoint.isPrimary (self)

Returns true if this touch point is the primary touch point. The primary touch point is the point for which the windowing system generates mouse events.

### QPointF TouchPoint.lastNormalizedPos (self)

Returns the normalized position of this touch point from the previous touch event.

The coordinates are normalized to the size of the touch device, i.e. (0,0) is the top-left corner and (1,1) is the bottom-right corner.

See also normalizedPos() and startNormalizedPos().

### QPointF TouchPoint.lastPos (self)

Returns the position of this touch point from the previous touch event, relative to the widget or QGraphicsItem that received the event.

See also pos() and startPos().

### QPointF TouchPoint.lastScenePos (self)

Returns the scene position of this touch point from the previous touch event.

The scene position is the position in QGraphicsScene coordinates if the QTouchEvent is handled by a QGraphicsItem.touchEvent() reimplementation, and identical to the screen position for widgets.

See also scenePos() and startScenePos().

### QPointF TouchPoint.lastScreenPos (self)

Returns the screen position of this touch point from the previous touch event.

See also screenPos() and startScreenPos().

### QPointF TouchPoint.normalizedPos (self)

Returns the normalized position of this touch point.

The coordinates are normalized to the size of the touch device, i.e. (0,0) is the top-left corner and (1,1) is the bottom-right corner.

See also startNormalizedPos(), lastNormalizedPos(), and pos().

### QPointF TouchPoint.pos (self)

Returns the position of this touch point, relative to the widget or QGraphicsItem that received the event.

See also startPos(), lastPos(), screenPos(), scenePos(), and normalizedPos().

### float TouchPoint.pressure (self)

Returns the pressure of this touch point. The return value is in the range 0.0 to 1.0.

### QRectF TouchPoint.rect (self)

Returns the rect for this touch point, relative to the widget or QGraphicsItem that received the event. The rect is centered around the point returned by pos().

Note: This function returns an empty rect if the device does not report touch point sizes.

### QPointF TouchPoint.scenePos (self)

Returns the scene position of this touch point.

The scene position is the position in QGraphicsScene coordinates if the QTouchEvent is handled by a QGraphicsItem.touchEvent() reimplementation, and identical to the screen position for widgets.

See also startScenePos(), lastScenePos(), and pos().

### QRectF TouchPoint.sceneRect (self)

Returns the rect for this touch point in scene coordinates.

Note: This function returns an empty rect if the device does not report touch point sizes.

See also scenePos() and rect().

### QPointF TouchPoint.screenPos (self)

Returns the screen position of this touch point.

See also startScreenPos(), lastScreenPos(), and pos().

### QRectF TouchPoint.screenRect (self)

Returns the rect for this touch point in screen coordinates.

Note: This function returns an empty rect if the device does not report touch point sizes.

See also screenPos() and rect().

### QPointF TouchPoint.startNormalizedPos (self)

Returns the normalized starting position of this touch point.

The coordinates are normalized to the size of the touch device, i.e. (0,0) is the top-left corner and (1,1) is the bottom-right corner.

See also normalizedPos() and lastNormalizedPos().

### QPointF TouchPoint.startPos (self)

Returns the starting position of this touch point, relative to the widget or QGraphicsItem that received the event.

See also pos() and lastPos().

### QPointF TouchPoint.startScenePos (self)

Returns the starting scene position of this touch point.

The scene position is the position in QGraphicsScene coordinates if the QTouchEvent is handled by a QGraphicsItem.touchEvent() reimplementation, and identical to the screen position for widgets.

See also scenePos() and lastScenePos().

### QPointF TouchPoint.startScreenPos (self)

Returns the starting screen position of this touch point.

See also screenPos() and lastScreenPos().

### Qt.TouchPointState TouchPoint.state (self)

Returns the current state of this touch point.