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 系列 Qt 在模块 API 和功能方面的重要变更。

许可证和商标

Qt SCXML 模块可在Qt Company 的商业许可下使用。此外,它还受自由软件许可证的保护:GNU 宽通用公共许可证第 3 版GNU 通用公共许可证第 2 版。更多详情,请参阅Qt 许可

© 2025 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.