|  | Home · All Classes · Modules

# QKeyEventTransition Class Reference
[QtGui module]

The QKeyEventTransition class provides a transition for key events. More...

Inherits QEventTransition.

### Methods

- __init__ (self, QState sourceState = None)
- __init__ (self, QObject, QEvent.Type, int, QState sourceState = None)
- bool eventTest (self, QEvent)
- int key (self)
- Qt.KeyboardModifiers modifierMask (self)
- onTransition (self, QEvent)
- setKey (self, int)
- setModifierMask (self, Qt.KeyboardModifiers)

## Detailed Description

The QKeyEventTransition class provides a transition for key events.

QKeyEventTransition is part of The State Machine Framework.

See also QState.addTransition().

## Method Documentation

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

Constructs a new key event transition with the given sourceState.

### QKeyEventTransition.__init__ (self, QObject, QEvent.Type, int, QState sourceState = None)

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

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

Reimplemented from QAbstractTransition.eventTest().

### int QKeyEventTransition.key (self)

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

### QKeyEventTransition.onTransition (self, QEvent)

Reimplemented from QAbstractTransition.onTransition().

### QKeyEventTransition.setKey (self, int)

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