本页内容

QCategory3DAxis Class

QCategory3DAxis 类用于操作图表的某个坐标轴。更多内容...

头文件: #include <QCategory3DAxis>
CMake: find_package(Qt6 REQUIRED COMPONENTS Graphs)
target_link_libraries(mytarget PRIVATE Qt6::Graphs)
qmake: QT += graphs
在 QML 中: Category3DAxis
继承自: QAbstract3DAxis

属性

公共函数

QCategory3DAxis(QObject *parent = nullptr)
virtual ~QCategory3DAxis() override
QStringList labels() const
void setLabels(const QStringList &labels)

详细说明

QCategory3DAxis 提供了一个可添加标签的坐标轴。该坐标轴会根据通过设置坐标轴范围所定义的数据窗口大小,被划分为大小相等的类别。

如果网格线可见,则会在类别之间绘制网格线。如果提供了标签,则会将其绘制在类别的位置上。

属性文档

labels : QStringList

该属性存储应用于各类别的坐标轴标签。

如果标签数量少于类别数量,则剩余的类别将不显示标签。如果未显式定义类别标签,系统将根据图表主序列的数据行(或列)标签生成标签。

访问函数:

QStringList labels() const
void setLabels(const QStringList &labels)

通知信号:

void labelsChanged()

成员函数文档

[explicit] QCategory3DAxis::QCategory3DAxis(QObject *parent = nullptr)

使用父类parent 构建一个3D轴类。

[override virtual noexcept] QCategory3DAxis::~QCategory3DAxis()

删除该类别的 3D 轴。

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