WeekNumberColumn QML Type
주 번호 열입니다. 더 보기...
Import Statement: | import QtQuick.Controls |
Inherits: |
속성
상세 설명
주 번호 열은 열에 주 번호를 표시합니다. 주 번호는 지정된 locale 을 사용하여 지정된 month 및 year 에 대해 계산됩니다.
WeekNumberColumn { month: Calendar.December year: 2015 locale: Qt.locale("en_US") }
주 번호 열은 독립형 컨트롤로 사용할 수 있지만 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 을 구현하여 변경할 수 있습니다.
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 }
month : int |
이 속성에는 주 번호가 계산되는 월의 번호가 저장됩니다. 기본값은 현재 월입니다.
Qt Quick 캘린더 모듈은 0을 기준으로 한 월 번호를 사용하여 QML 언어에서 사용하는 JavaScript 날짜 유형과 일관성을 유지합니다. 즉, Date::getMonth()
을 그대로 메서드에 전달할 수 있습니다. 월 번호를 직접 처리할 때는 혼동을 피하기 위해 다음 열거형 값을 사용하는 것이 좋습니다.
상수 | 설명 |
---|---|
Calendar.January | January (0) |
Calendar.February | February (1) |
Calendar.March | March (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
범위여야 합니다. 기본값은 현재 연도입니다.
© 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.