DateTimeAxis QML Type
在图表轴上添加日期和时间。更多...
| Import Statement: | import QtCharts 2.12 |
| In C++: | QDateTimeAxis |
| Inherits: | |
| Status: | Deprecated |
此类型已弃用。我们强烈建议在新代码中不要使用它。
属性
信号
- 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.