DateTimeAxis QML Type
为图表的坐标轴添加日期和时间。更多
| Import Statement: | import QtCharts 2.11 |
| In C++: | QDateTimeAxis |
| Inherits: |
属性
信号
- rangeChanged(datetime min, datetime max)
详细说明
DateTimeAxis 类型可设置为显示带有刻度线、网格线和阴影的轴线。轴标签显示日期和时间,可通过设置适当的 DateTime 格式进行配置。
注意: 公元前 4714 年之前或公元 140 万年之后的任何日期都可能无法准确存储。
属性文档
format : string
格式字符串,用于从QDateTime 对象中创建轴标签。有关如何定义字符串的信息,请参阅QDateTime 文档。
max : datetime
轴上的最大值。
设置此属性时,如有必要,会对最小值进行调整,以确保范围保持有效。
min : datetime
轴上的最小值。
设置此属性时,必要时会调整最大值,以确保范围保持有效。
tickCount : int
轴上刻度线的数量。
信号文档
rangeChanged(datetime min, datetime max)
当min 和max 指定的轴的最小值或最大值发生变化时,将发出该信号。
相应的信号处理程序是onRangeChanged() 。
注: 相应的处理程序是onRangeChanged 。
© 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.