本页内容

变更内容Qt Charts

Qt 6 的变更,是出于让该框架更高效、更易于使用而进行的有意识努力的结果。

我们力求在每个版本中保持所有公开 API 的二进制和源代码兼容性。但为了使 Qt 成为更好的框架,某些变更在所难免。

本文档总结了Qt Charts 中的这些变更。

QtCharts 命名空间

Qt Charts 不再拥有专用的QtCharts 命名空间。取而代之的是,如果 Qt 构建中配置了命名空间,则使用标准的 Qt 命名空间。

QML 中的 OpenGL 加速

顾名思义,AbstractSeries.useOpenGL 仍仅支持 OpenGL 加速,因此如果 QML RHI 后端被定义为其他类型(这通常是 Qt 6 的默认设置),则无法正常工作。要解决此问题,请强制使用 RHI OpenGL 后端,例如通过设置环境变量QSG_RHI_BACKEND=opengl 。

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