对Qt SCXML
Qt 6 是有意识地提高框架效率和易用性的结果。
我们努力在每个版本中保持所有公共 API 的二进制和源代码兼容性。但为了使 Qt 成为一个更好的框架,有些改动是不可避免的。
在本主题中,我们总结了Qt SCXML 模块中的这些变化,并提供了处理这些变化的指导。
更改概述
Qt SCXML 模块在很大程度上与 Qt5 版本的源代码兼容,该库的用户可以继续使用,无需对其项目进行任何改动或改动很小。
API 变化
删除 QScxmlEcmaScriptDataModel API
启用 ecmascript 数据模型时,会引入对 Qt QML 库的依赖。在 Qt5 中,该依赖关系在构建时创建,而在 Qt6 中,该依赖关系被移至运行时(内部为插件)。因此,QScxmlEcmaScriptDataModel 类不再是公共 API 的一部分。
构建系统
与 Qt6 一样,除了 qmake 之外,Qt SCXML 模块还支持 cmake。
QML 导入
QML 导入版本是可选的,除非有特殊原因不使用最新版本。一般来说,版本控制的导入从 5.8 到 6.x,其中 "x "为当前的次版本。
© 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.