Qt SCXML
Qt SCXML 模块提供了从SCXML文件创建状态机的功能。这既包括动态创建状态机(加载SCXML文件并实例化状态和转换),也包括生成一个包含实现该状态机类的C++文件。该模块还包含支持数据模型和可执行内容的功能。
入门指南
要使用Qt SCXML ,请安装Qt State Machine附加库。
要将 QML 类型导入到您的应用程序中,请在 .qml 文件中使用以下导入语句:
import QtScxml要链接该模块:
使用 cmake:
find_package(Qt6 REQUIRED COMPONENTS Scxml)
target_link_libraries(mytarget PRIVATE Qt6::Scxml)使用 qmake:
QT += scxml文章和指南
示例
参考
模块演变
“Qt SCXML”一节列出了为 Qt 6 系列所做的模块 API 和功能方面的重大变更。
许可与商标
Qt SCXML 模块由The Qt Company提供商业许可。此外,该模块还提供自由软件许可:GNU较少通用公共许可证第3版或GNU通用公共许可证第2版。更多详情请参阅Qt许可。
© 2026 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 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.