Qt Charts

Qt 6 的改动是有意识地使框架更高效、更易用的结果。

我们努力在每个版本中保持所有公共 API 的二进制和源代码兼容性。但为了使 Qt 成为一个更好的框架,有些改动是不可避免的。

在本文档中,我们总结了Qt Charts 中的这些变化。

QtCharts 命名空间

Qt Charts 不再有自定义的 命名空间。相反,如果为 Qt 构建配置了正常的 Qt 命名空间,则会使用该命名空间。QtCharts

QML 中的 OpenGL 加速

顾名思义,AbstractSeries.useOpenGL 仍然只支持 OpenGL 加速,因此如果 QML RHI 后端被定义为其他东西(Qt 6 中通常默认为其他东西),它将无法工作。强制使用 RHI OpenGL 后端可解决这个问题,例如使用环境变量QSG_RHI_BACKEND=opengl

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