WeekNumberColumn QML Type
주 번호 열. 더 보기...
| Import Statement: | import QtQuick.Controls |
| Inherits: |
속성
상세 설명
WeekNumberColumn은 열 형태로 주 번호를 표시합니다. 주 번호는 지정된 month 및 year 에 대해, 지정된 locale 를 사용하여 계산됩니다.

WeekNumberColumn {
month: Calendar.December
year: 2015
locale: Qt.locale("en_US")
}WeekNumberColumn은 독립형 컨트롤로 사용할 수 있지만, 대부분 MonthGrid 과 함께 사용됩니다. 사용 사례에 관계없이 열의 위치는 사용자가 직접 지정할 수 있습니다.

RowLayout {
WeekNumberColumn {
month: grid.month
year: grid.year
locale: grid.locale
Layout.fillHeight: true
}
MonthGrid {
id: grid
month: Calendar.December
year: 2015
locale: Qt.locale("en_US")
Layout.fillHeight: true
}
}custom delegate 을 구현하여 WeekNumberColumn의 시각적 모양을 변경할 수 있습니다.
MonthGrid 및 DayOfWeekRow도 참조하십시오 .
속성 설명서
delegate : Component
이 속성은 각 주 번호를 시각화하는 항목 델리게이트를 포함합니다.
index 속성 외에도, 각 델리게이트의 컨텍스트 내에서 다음과 같은 모델 데이터 역할 목록을 사용할 수 있습니다:
| model.weekNumber: int | 주 번호 |
다음 코드 조각은 항목 델리게이트의 기본 구현을 보여줍니다. 이는 사용자 정의 델리게이트를 구현할 때 출발점으로 사용할 수 있습니다.
delegate: Text {
text: weekNumber
font: control.font
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
required property int weekNumber
}WeekNumberColumn 는 델리게이트에 대한 소유권을 가져가지 않습니다.
month : int
이 속성은 주 번호가 계산되는 달의 번호를 저장합니다. 기본값은 현재 달입니다.
의 캘린더 관련 유형에서는 Qt Quick Controls JavaScript Date 객체와 마찬가지로 0을 기준으로 한 월 번호를 사용합니다. 그러나 이는 월 번호가 1부터 시작되는 QDate 와는 다릅니다.
혼동을 피하기 위해 다음 열거형 값을 사용할 수 있습니다:
| 상수 | 설명 |
|---|---|
Calendar.January | 1월 (0) |
Calendar.February | 2월 (1) |
Calendar.March | 3월 (2) |
Calendar.April | 4월 (3) |
Calendar.May | 5월 (4) |
Calendar.June | 6월 (5) |
Calendar.July | 7월 (6) |
Calendar.August | 8월 (7) |
Calendar.September | 9월 (8) |
Calendar.October | 10월 (9) |
Calendar.November | 11월 (10) |
Calendar.December | 12월 (11) |
Calendar도 참조하십시오 .
year : int
이 속성은 주 번호가 계산되는 연도의 번호를 저장합니다.
값은 -271820 부터 275759 사이의 범위여야 합니다. 기본값은 현재 연도입니다.
© 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.