|  | Home · All Classes · Modules

# QMouseEventTransition Class Reference
[QtGui module]

The QMouseEventTransition class provides a transition for mouse events. More...

Inherits QEventTransition.

### Methods

- __init__ (self, QState sourceState = None)
- __init__ (self, QObject, QEvent.Type, Qt.MouseButton, QState sourceState = None)
- Qt.MouseButton button (self)
- bool eventTest (self, QEvent)
- QPainterPath hitTestPath (self)
- Qt.KeyboardModifiers modifierMask (self)
- onTransition (self, QEvent)
- setButton (self, Qt.MouseButton)
- setHitTestPath (self, QPainterPath)
- setModifierMask (self, Qt.KeyboardModifiers)

## Detailed Description

The QMouseEventTransition class provides a transition for mouse events.

QMouseEventTransition is part of The State Machine Framework.

## Method Documentation

### QMouseEventTransition.__init__ (self, QState sourceState = None)

Constructs a new mouse event transition with the given sourceState.

### QMouseEventTransition.__init__ (self, QObject, QEvent.Type, Qt.MouseButton, QState sourceState = None)

Constructs a new mouse event transition for events of the given type for the given object, with the given button and sourceState.

### Qt.MouseButton QMouseEventTransition.button (self)

### bool QMouseEventTransition.eventTest (self, QEvent)

Reimplemented from QAbstractTransition.eventTest().

### QPainterPath QMouseEventTransition.hitTestPath (self)

Returns the hit test path for this mouse event transition.

See also setHitTestPath().

### Qt.KeyboardModifiers QMouseEventTransition.modifierMask (self)

### QMouseEventTransition.onTransition (self, QEvent)

Reimplemented from QAbstractTransition.onTransition().

### QMouseEventTransition.setButton (self, Qt.MouseButton)

### QMouseEventTransition.setHitTestPath (self, QPainterPath)

Sets the hit test path for this mouse event transition to path. If a valid path has been set, the transition will only trigger if the mouse event position (QMouseEvent.pos()) is inside the path.

See also hitTestPath() and QPainterPath.contains().

### QMouseEventTransition.setModifierMask (self, Qt.KeyboardModifiers)