Qt SCXML 模块提供状态机创建功能从 SCXML 文件。这包括动态创建状态机 (加载 SCXML 文件、实例化状态及过渡) 和生成拥有实现状态机的类的 C++ 文件。它还包含支持数据模型和可执行内容的功能。
要导入 QML 类型到应用程序中,使用以下 import 语句在 .qml 文件中:
import QtScxml
To link against the module:
Using cmake:
find_package(Qt6 REQUIRED COMPONENTS Scxml)
target_link_libraries(mytarget PRIVATE Qt6::Scxml)
Using qmake:
QT += scxml
Changes to Qt SCXML lists important changes in the module API and functionality that were done for the Qt 6 series of Qt.
The Qt SCXML module is available under commercial licenses from Qt 公司 . In addition, it is available under free software licenses: The GNU LGPL (次一般公共许可) 第 3 版 ,或 GNU GPL (一般公共许可) 第 2 版 。见 Qt 许可 进一步了解细节。