Obsolete Members for QtGraphs3D

QtGraphs3D 的以下成员已被弃用。提供这些成员是为了保持旧源代码的正常运行。我们强烈建议不要在新代码中使用它们。

函数

(deprecated in 6.9) QSurfaceFormat qDefaultSurfaceFormat(bool antialias)

函数文档

[deprecated in 6.9] QSurfaceFormat qDefaultSurfaceFormat(bool antialias)

自 6.9 版起,该函数已被弃用。我们强烈建议不要在新代码中使用该函数。

使用QQuick3D::idealSurfaceFormat()

此方便函数可用于创建适合Qt Graphs 图形使用的自定义曲面格式。

antialias 参数用于指定是否激活抗锯齿。

在调用show() 之前,请将此函数返回的曲面格式提供给图形构造函数(C++),或将其设置为QQuickView 的窗口格式(QML)。

例如,在 C++ 应用程序中禁用抗锯齿:

#include <QtGraphs/qutils.h>

// ...

QSurfaceFormat::setDefaultFormat(qDefaultSurfaceFormat(true));

例如,在 QML 应用程序中为直接渲染模式启用抗锯齿:

#include <QtGraphs/qutils.h>

// ...

QQuickView viewer;
viewer.setFormat(qDefaultSurfaceFormat(true));

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