AbstractAxis QML Type
用于特殊轴类型的基本类型。更多
Import Statement: | import QtGraphs |
In C++: | QAbstractAxis |
Inherited By: |
- 所有成员(包括继承成员)的列表
- AbstractAxis 是Qt Graphs QML Types for 2D 的一部分。
属性
- alignment : alignment
(since 6.9)
- gridVisible : bool
- labelDelegate : Component
- labelsAngle : real
- labelsVisible : bool
- lineVisible : bool
- subGridVisible : bool
- titleColor : color
- titleFont : font
- titleText : string
- titleVisible : bool
- visible : bool
信号
- gridVisibleChanged(bool visible)
- labelsAngleChanged(string angle)
- labelsVisibleChanged(bool visible)
- lineVisibleChanged(bool visible)
- minorGridVisibleChanged(bool visible)
- rangeChanged(string min, string max)
- titleColorChanged(color color)
- titleFontChanged(Font font)
- titleTextChanged(string text)
- titleVisibleChanged(bool visible)
- visibleChanged(bool visible)
详细说明
每个系列只能绑定一个水平轴和垂直轴。
各种轴元素(如轴线、标题、标签和网格线)的属性和可见性均可单独控制。
属性文档
alignment : alignment |
坐标轴的对齐方式。可以是Qt.AlignLeft,Qt.AlignRight,Qt.AlignBottom, 或Qt.AlignTop 。
该属性在 Qt 6.9 中引入。
gridVisible : bool |
网格线的可见性。默认值为true
。
labelDelegate : Component |
用作轴标签的自定义 QML 组件。该组件应为Text 组件或包含 "属性字符串文本",这样该属性就会被赋予标签的值。
labelsAngle : real |
轴标签的角度(单位:度)。
labelsVisible : bool |
轴标签的可见度。默认值为true
。
lineVisible : bool |
轴线的可见性。默认值为true
。
subGridVisible : bool |
子网格线的可见性。仅适用于支持子网格线的轴。默认值为true
。
titleColor : color |
用于绘制标题文本的颜色。
titleFont : font |
轴标题的字体。
titleText : string |
轴的标题。默认为空。轴标题支持 HTML 格式。
titleVisible : bool |
轴标题的可见性。默认值为true
。
visible : bool |
轴的可见性。默认值为true
。
信号文档
gridVisibleChanged(bool visible) |
当坐标轴网格线的可见性变为visible 时,将发出该信号。
注: 相应的处理程序为onGridVisibleChanged
。
labelsAngleChanged(string angle) |
当坐标轴标签的角度变为angle 时,发出此信号。
注: 相应的处理程序是onLabelsAngleChanged
。
labelsVisibleChanged(bool visible) |
当坐标轴标签的可见性变为visible 时,发出此信号。
注: 相应的处理程序是onLabelsVisibleChanged
。
lineVisibleChanged(bool visible) |
当坐标轴线的可见性变为visible 时,发出该信号。
注: 相应的处理程序是onLineVisibleChanged
。
minorGridVisibleChanged(bool visible) |
当轴的次网格线的可见性变为visible 时,发出该信号。
注: 相应的处理程序是onMinorGridVisibleChanged
。
titleColorChanged(color color) |
当用于绘制轴标题的颜色更改为color 时,将发出该信号。
注: 相应的处理程序是onTitleColorChanged
。
titleFontChanged(Font font) |
当轴标题的字体更改为font 时,将发出此信号。
注: 相应的处理程序是onTitleFontChanged
。
titleTextChanged(string text) |
当轴标题的文本更改为text 时,将发出此信号。
注: 相应的处理程序是onTitleTextChanged
。
titleVisibleChanged(bool visible) |
当坐标轴标题文本的可见性变为visible 时,发出此信号。
注: 相应的处理程序是onTitleVisibleChanged
。
visibleChanged(bool visible) |
当坐标轴的可见性变为visible 时,发出此信号。
注: 相应的处理程序是onVisibleChanged
。
© 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.