PySide6.QtScxml.QScxmlEvent - Qt for Python
PySide6.QtScxml.QScxmlEvent - Qt for Python
P y S i d e 6 .Q t S c x m l .Q S c x m l Eve n t
class QScxmlEvent
The QScxmlEvent class is an event for a Qt SCXML state machine. More…
Sy n o p s i s
P ro p e r t i e s
• data - The data included by the sender
• delay - In milliseconds after which the event is to be delivered after processing the <send>
element
• errorEvent - Whether the event represents an error
• errorMessage - An error message for an error event, or an empty QString
• eventType - The type of the event
• invokeId - The ID of the invoked state machine if the event is generated by one
• name - The name of the event
• origin - The URI that points to the origin of an SCXML event
• originType - The origin type of an SCXML event
• scxmlType - Event type
• sendId - The ID of the event
Method s
• def __init__()
• def clear()
• def data()
• def delay()
• def errorMessage()
• def eventType()
• def invokeId()
• def isErrorEvent()
• def name()
• def origin()
• def originType()
1 of 12 13-Dec-24, 18:41
PySide6.QtScxml.QScxmlEvent - Qt for Python https://doc.qt.io/qtforpython-6/PySide6/QtScxml/QScxmlEvent.html#P...
• def scxmlType()
• def sendId()
• def setData()
• def setDelay()
• def setErrorMessage()
• def setEventType()
• def setInvokeId()
• def setName()
• def setOrigin()
• def setOriginType()
• def setSendId()
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
SCXML events drive transitions. Most events are generated by using the <raise> and <send>
elements in the application. The state machine automatically generates some mandatory events,
such as errors.
For more information, see SCXML Specification - 5.10.1 The Internal Structure of Events . For
more information about how the Qt SCXML API differs from the specification, see SCXML
Compliance .
See also
QScxmlStateMachine
class EventType
This enum type specifies the type of an SCXML event:
Con s t a nt Description
QScxmlEvent.PlatformEvent An event generated internally by the state machine. For example, errors.
2 of 12 13-Dec-24, 18:41
PySide6.QtScxml.QScxmlEvent - Qt for Python https://doc.qt.io/qtforpython-6/PySide6/QtScxml/QScxmlEvent.html#P...
Note
Properties can be used directly when from __feature__ import true_property is used or via accessor functions
otherwise.
When <param> elements are used in the <send> element, the data will contain a QVariantMap
where the key is the name attribute, and the value is taken from the expr attribute or the location
attribute.
When a <content> element is used, the data will contain a single item with either the value of the
expr attribute of the <content> element or the child data of the <content> element.
Acce s s f u n c t i o n s :
• data()
• setData()
Acce s s f u n c t i o n s :
• delay()
• setDelay()
Acce s s f u n c t i o n s :
• isErrorEvent()
3 of 12 13-Dec-24, 18:41
PySide6.QtScxml.QScxmlEvent - Qt for Python https://doc.qt.io/qtforpython-6/PySide6/QtScxml/QScxmlEvent.html#P...
Acce s s f u n c t i o n s :
• errorMessage()
• setErrorMessage()
Acce s s f u n c t i o n s :
• eventType()
• setEventType()
Acce s s f u n c t i o n s :
• invokeId()
• setInvokeId()
If the event is generated inside the SCXML document, this property holds the value of the event
attribute specified inside the <raise> or <send> element.
If the event is created in the C++ code and submitted to the QScxmlStateMachine , the value of this
property is matched against the value of the event attribute specified inside the <transition>
element in the SCXML document.
Acce s s f u n c t i o n s :
• name()
• setName()
Acce s s f u n c t i o n s :
• origin()
• setOrigin()
4 of 12 13-Dec-24, 18:41
PySide6.QtScxml.QScxmlEvent - Qt for Python https://doc.qt.io/qtforpython-6/PySide6/QtScxml/QScxmlEvent.html#P...
setOrigin()
The origin type is equivalent to the type attribute of the <send> element.
Acce s s f u n c t i o n s :
• originType()
• setOriginType()
Acce s s f u n c t i o n s :
• scxmlType()
Note
The state machine generates a unique ID if the id attribute is not specified in the <send> element. The generated ID
can be accessed through this property.
Acce s s f u n c t i o n s :
• sendId()
• setSendId()
__init__()
Creates a new external SCXML event.
__init__(other)
PARAMETERS:
other – QScxmlEvent
clear()
5 of 12 13-Dec-24, 18:41
PySide6.QtScxml.QScxmlEvent - Qt for Python https://doc.qt.io/qtforpython-6/PySide6/QtScxml/QScxmlEvent.html#P...
data()
RETURN TYPE:
object
See also
setData()
delay()
RETURN TYPE:
int
Returns the delay in milliseconds after which this event is to be delivered after processing the
<send> element.
See also
setDelay()
errorMessage()
RETURN TYPE:
str
If this is an error event, returns the error message. Otherwise, returns an empty QString.
See also
setErrorMessage()
6 of 12 13-Dec-24, 18:41
PySide6.QtScxml.QScxmlEvent - Qt for Python https://doc.qt.io/qtforpython-6/PySide6/QtScxml/QScxmlEvent.html#P...
eventType()
RETURN TYPE:
EventType
See also
setEventType() EventType
invokeId()
RETURN TYPE:
str
If this event is generated by an invoked state machine, returns the ID of the <invoke> element.
Otherwise, returns an empty value.
See also
setInvokeId()
isErrorEvent()
RETURN TYPE:
bool
name()
RETURN TYPE:
str
7 of 12 13-Dec-24, 18:41
PySide6.QtScxml.QScxmlEvent - Qt for Python https://doc.qt.io/qtforpython-6/PySide6/QtScxml/QScxmlEvent.html#P...
See also
setName()
origin()
RETURN TYPE:
str
See also
setOrigin()
originType()
RETURN TYPE:
str
See also
setOriginType()
scxmlType()
RETURN TYPE:
str
8 of 12 13-Dec-24, 18:41
PySide6.QtScxml.QScxmlEvent - Qt for Python https://doc.qt.io/qtforpython-6/PySide6/QtScxml/QScxmlEvent.html#P...
sendId()
RETURN TYPE:
str
See also
setSendId()
setData(data)
PARAMETERS:
data – object
See also
data
setDelay(delayInMiliSecs)
PARAMETERS:
delayInMiliSecs – int
See also
delay
setErrorMessage(message)
9 of 12 13-Dec-24, 18:41
PySide6.QtScxml.QScxmlEvent - Qt for Python https://doc.qt.io/qtforpython-6/PySide6/QtScxml/QScxmlEvent.html#P...
setErrorMessage(message)
PARAMETERS:
message – str
See also
errorMessage()
setEventType(type)
PARAMETERS:
type – EventType
See also
eventType EventType
setInvokeId(invokeId)
PARAMETERS:
invokeId – str
See also
invokeId
setName(name)
PARAMETERS:
10 of 12 13-Dec-24, 18:41
PySide6.QtScxml.QScxmlEvent - Qt for Python https://doc.qt.io/qtforpython-6/PySide6/QtScxml/QScxmlEvent.html#P...
PARAMETERS:
name – str
See also
name()
setOrigin(origin)
PARAMETERS:
origin – str
See also
origin
setOriginType(originType)
PARAMETERS:
originType – str
See also
originType
setSendId(sendId)
PARAMETERS:
sendId – str
11 of 12 13-Dec-24, 18:41
PySide6.QtScxml.QScxmlEvent - Qt for Python https://doc.qt.io/qtforpython-6/PySide6/QtScxml/QScxmlEvent.html#P...
See also
sendId()
Copyright © 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners.
The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 (https://
www.gnu.org/licenses/fdl.html) as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt
Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.
Made with Sphinx and @pradyunsg's Furo
12 of 12 13-Dec-24, 18:41