|  | 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 object, QEvent.Type type, Qt.MouseButton button, QState sourceState = None)
- Qt.MouseButton button (self)
- bool eventTest (self, QEvent event)
- QPainterPath hitTestPath (self)
- Qt.KeyboardModifiers modifierMask (self)
- onTransition (self, QEvent event)
- setButton (self, Qt.MouseButton button)
- setHitTestPath (self, QPainterPath path)
- setModifierMask (self, Qt.KeyboardModifiers modifiers)

## 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)

The sourceState argument, if not None, causes self to be owned by Qt instead of PyQt.

Constructs a new mouse event transition with the given sourceState.

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

The sourceState argument, if not None, causes self to be owned by Qt instead of PyQt.

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 event)

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 event)

Reimplemented from QAbstractTransition.onTransition().

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

### QMouseEventTransition.setHitTestPath (self, QPainterPath path)

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 modifiers)