PySide6.QtStateMachine.QMouseEventTransition

class QMouseEventTransition

The QMouseEventTransition class provides a transition for mouse events. More

Inheritance diagram of PySide6.QtStateMachine.QMouseEventTransition

Synopsis

Properties

  • buttonᅟ - The button that this mouse event transition is associated with

  • modifierMaskᅟ - The keyboard modifier mask that this mouse event transition checks for

Methods

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

Detailed Description

QMouseEventTransition is part of Qt State Machine Framework .

See also

addTransition()

Note

Properties can be used directly when from __feature__ import true_property is used or via accessor functions otherwise.

property buttonᅟ: Qt.MouseButton

This property holds the button that this mouse event transition is associated with.

Access functions:
property modifierMaskᅟ: Combination of Qt.KeyboardModifier

This property holds the keyboard modifier mask that this mouse event transition checks for.

Access functions:
__init__([sourceState=None])
Parameters:

sourceStateQState

Constructs a new mouse event transition with the given sourceState.

__init__(object, type, button[, sourceState=None])
Parameters:

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

button()
Return type:

MouseButton

Returns the button that this mouse event transition checks for.

See also

setButton()

Getter of property buttonᅟ .

hitTestPath()
Return type:

QPainterPath

Returns the hit test path for this mouse event transition.

See also

setHitTestPath()

modifierMask()
Return type:

Combination of KeyboardModifier

Returns the keyboard modifier mask that this mouse event transition checks for.

Getter of property modifierMaskᅟ .

setButton(button)
Parameters:

buttonMouseButton

Sets the button that this mouse event transition will check for.

See also

button()

Setter of property buttonᅟ .

setHitTestPath(path)
Parameters:

pathQPainterPath

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.

setModifierMask(modifiers)
Parameters:

modifiers – Combination of KeyboardModifier

Sets the keyboard modifier mask that this mouse event transition will check for to modifierMask.

See also

modifierMask()

Setter of property modifierMaskᅟ .