Obsolete Members for QChart

QChart 类的以下成员已被废弃。提供这些成员是为了确保旧源代码能够继续运行。我们强烈建议不要在新代码中使用它们。

公共函数

(deprecated) QAbstractAxis *axisX(QAbstractSeries *series = nullptr) const
(deprecated) QAbstractAxis *axisY(QAbstractSeries *series = nullptr) const
(deprecated) void setAxisX(QAbstractAxis *axis, QAbstractSeries *series = nullptr)
(deprecated) void setAxisY(QAbstractAxis *axis, QAbstractSeries *series = nullptr)

成员函数文档

[deprecated] QAbstractAxis *QChart::axisX(QAbstractSeries *series = nullptr) const

此函数已弃用。我们强烈建议不要在新代码中使用它。

请改用 `axes()`。

返回指向指定series 所关联的水平轴的指针。如果未指定系列,则返回添加到图表中的第一个水平轴。

另请参阅 setAxisX()、addAxis() 和QAbstractSeries::attachAxis()。

[deprecated] QAbstractAxis *QChart::axisY(QAbstractSeries *series = nullptr) const

此函数已弃用。我们强烈建议不要在新代码中使用它。

请改用 `axes()`。

返回指向指定series 所关联的垂直轴的指针。如果未指定系列,则返回添加到图表中的第一个垂直轴。

另请参阅 setAxisY()、addAxis() 和QAbstractSeries::attachAxis()。

[deprecated] void QChart::setAxisX(QAbstractAxis *axis, QAbstractSeries *series = nullptr)

此函数已弃用。我们强烈建议不要在新代码中使用它。

请改用 `addAxis()`。

将坐标轴axis 添加到图表中,并将其作为底部对齐的水平轴附加到序列series 上。图表将同时拥有该坐标轴和该序列的所有权。之前附加到该序列上的任何水平轴都将被删除。

另请参阅 axisX()、axisY()、setAxisY()、createDefaultAxes() 以及QAbstractSeries::attachAxis()。

[deprecated] void QChart::setAxisY(QAbstractAxis *axis, QAbstractSeries *series = nullptr)

此函数已弃用。我们强烈建议不要在新代码中使用它。

请改用addAxis()。

将坐标轴axis 添加到图表中,并将其作为左对齐的垂直坐标轴附加到数据系列series 上。图表将同时拥有该坐标轴和该数据系列的所有权。此前附加到该数据系列上的任何垂直坐标轴都将被删除。

另请参阅 axisX()、axisY()、setAxisX()、createDefaultAxes() 以及QAbstractSeries::attachAxis()。

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