内容表

上一话题

QMessageBox

下一话题

QOpenGLWidget

QMouseEventTransition

QMouseEventTransition class provides a transition for mouse events. 更多

Inheritance diagram of PySide2.QtWidgets.QMouseEventTransition

4.6 版新增。

概要

函数

详细描述

QMouseEventTransition is part of 状态机框架 .

另请参阅

addTransition()

class QMouseEventTransition ( object , type , button [ , sourceState=None ] )

QMouseEventTransition([sourceState=None])

param type

Type

param sourceState

QState

param button

MouseButton

param object

QObject

Constructs a new mouse event transition for events of the given type 为给定 object ,采用给定 button and sourceState .

Constructs a new mouse event transition with the given sourceState .

PySide2.QtWidgets.QMouseEventTransition. button ( )
返回类型

MouseButton

Returns the button that this mouse event transition checks for.

另请参阅

setButton()

PySide2.QtWidgets.QMouseEventTransition. hitTestPath ( )
返回类型

QPainterPath

Returns the hit test path for this mouse event transition.

另请参阅

setHitTestPath()

PySide2.QtWidgets.QMouseEventTransition. modifierMask ( )
返回类型

KeyboardModifiers

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

另请参阅

setModifierMask()

PySide2.QtWidgets.QMouseEventTransition. setButton ( button )
参数

button MouseButton

设置 button that this mouse event transition will check for.

另请参阅

button()

PySide2.QtWidgets.QMouseEventTransition. setHitTestPath ( path )
参数

path 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 ( pos() ) is inside the path.

另请参阅

hitTestPath() contains()

PySide2.QtWidgets.QMouseEventTransition. setModifierMask ( modifiers )
参数

modifiers KeyboardModifiers

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

另请参阅

modifierMask()