QGraphsLine Class
QGraphsLine 类封装了图形中直线的属性。更多内容...
| 头文件: | #include <QGraphsLine> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Graphs) target_link_libraries(mytarget PRIVATE Qt6::Graphs) |
| qmake: | QT += graphs |
| 在 QML 中: | graphsline |
属性
|
公共函数
| QGraphsLine(QGraphsLine &&other) | |
| QColor | labelTextColor() const |
| QColor | mainColor() const |
| qreal | mainWidth() const |
| void | setLabelTextColor(QColor newColor) |
| void | setMainColor(QColor newColor) |
| void | setMainWidth(qreal newWidth) |
| void | setSubColor(QColor newColor) |
| void | setSubWidth(qreal newWidth) |
| QColor | subColor() const |
| qreal | subWidth() const |
| void | swap(QGraphsLine &other) |
| QGraphsLine & | operator=(QGraphsLine &&other) |
属性文档
labelTextColor : QColor
坐标轴标签文字的颜色。如果未显式设置,则该值由主题决定。
访问函数:
| QColor | labelTextColor() const |
| void | setLabelTextColor(QColor newColor) |
mainColor : QColor
主网格或坐标轴线的颜色。如果未显式设置,则该值由主题决定。
访问函数:
| QColor | mainColor() const |
| void | setMainColor(QColor newColor) |
mainWidth : qreal
主网格或坐标轴线的宽度(以像素为单位)。
访问函数:
| qreal | mainWidth() const |
| void | setMainWidth(qreal newWidth) |
subColor : QColor
子网格或坐标轴线的颜色。如果未显式设置,则该值由主题决定。
访问函数:
| QColor | subColor() const |
| void | setSubColor(QColor newColor) |
subWidth : qreal
子网格或坐标轴线的宽度(以像素为单位)。
访问函数:
| qreal | subWidth() const |
| void | setSubWidth(qreal newWidth) |
成员函数文档
[constexpr noexcept default] QGraphsLine::QGraphsLine(QGraphsLine &&other)
从other 创建一个新的 QGraphsLine 对象。
注意: 被移动的对象 other 将处于部分构建状态,在此状态下,唯一有效的操作是销毁和赋值。
[noexcept] void QGraphsLine::swap(QGraphsLine &other)
将QGraphsLine other 替换为QGraphsLine 。此操作速度极快,且从未失败。
[noexcept] QGraphsLine &QGraphsLine::operator=(QGraphsLine &&other)
将other 通过“移动赋值”操作赋值给此QGraphsLine 实例。
注意: 被移动的对象 other 将处于部分初始化状态,在此状态下,唯一有效的操作是销毁和赋予新值。
© 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.