本页内容

Calendar QML Type

日历命名空间。更多...

Import Statement: import QtQuick.Controls
Inherits:

QtObject

详细说明

Calendar 单例提供各种与日历相关的实用工具。

此处日历相关的类型 Qt Quick Controls 使用以0为起点的月份编号,与JavaScript的Date对象类似。但这与QDate 不同,后者采用从1开始的月份编号。

为避免混淆,您可以使用以下枚举值:

常量描述
Calendar.January一月 (0)
Calendar.February二月 (1)
Calendar.March3月 (2)
Calendar.April4月 (3)
Calendar.May5月 (4)
Calendar.June6月 (5)
Calendar.July7月 (6)
Calendar.August8月 (7)
Calendar.September9月 (8)
Calendar.October10月 (9)
Calendar.November11月 (10)
Calendar.December12月 (11)

另请参阅 MonthGrid 、DayOfWeekRow 以及WeekNumberColumn 。

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