QMouseEventTransitionclass provides a transition for mouse events. 更多 …
4.6 版新增。
def
button
()
def
hitTestPath
()
def
modifierMask
()
def
setButton
(button)
def
setHitTestPath
(path)
def
setModifierMask
(modifiers)
QMouseEventTransitionis part of 状态机框架 .另请参阅
addTransition()
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
.
MouseButton
Returns the button that this mouse event transition checks for.
另请参阅
PySide2.QtWidgets.QMouseEventTransition.
hitTestPath
(
)
¶
QPainterPath
Returns the hit test path for this mouse event transition.
另请参阅
PySide2.QtWidgets.QMouseEventTransition.
modifierMask
(
)
¶
KeyboardModifiers
Returns the keyboard modifier mask that this mouse event transition checks for.
另请参阅
PySide2.QtWidgets.QMouseEventTransition.
setButton
(
button
)
¶
button
–
MouseButton
设置
button
that this mouse event transition will check for.
另请参阅
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
.
另请参阅