DayOfWeekRow QML Type

한 주의 요일에 대한 이름 행입니다. 더 보기...

Import Statement: import QtQuick.Controls
Inherits:

Control

속성

상세 설명

DayOfWeekRow는 요일 이름을 연속으로 표시합니다. 요일 이름은 지정된 locale 을 사용하여 정렬되고 형식이 지정됩니다.

DayOfWeekRow {
    locale: Qt.locale("en_US")
}

DayOfWeekRow는 독립형 컨트롤로 사용할 수 있지만 MonthGrid 와 함께 사용하는 경우가 가장 많습니다. 사용 사례와 관계없이 행의 위치는 사용자에게 맡겨집니다.

ColumnLayout {
    DayOfWeekRow {
        locale: grid.locale
        Layout.fillWidth: true
    }

    MonthGrid {
        id: grid
        month: Calendar.December
        year: 2015
        locale: Qt.locale("en_US")
        Layout.fillWidth: true
    }
}

DayOfWeekRow의 시각적 모양은 custom delegate 을 구현하여 변경할 수 있습니다.

MonthGridWeekNumberColumn참조하세요 .

속성 문서

delegate : Component

이 속성은 각 요일을 시각화하는 항목 델리게이트를 보유합니다.

index 속성 외에도 각 델리게이트의 컨텍스트에서 모델 데이터 역할 목록을 사용할 수 있습니다:

model.day: int요일 (Qt::DayOfWeek)
model.longName: 문자열요일 이름의 긴 버전(예: "월요일"(QLocale::LongFormat)
model.shortName: 문자열요일 이름의 짧은 버전, 예: "월" (QLocale::ShortFormat)
model.narrowName: 문자열공간이 제한되어 있을 때 사용하는 요일 이름의 특수 버전입니다. 예: "M"(QLocale::NarrowFormat)

다음 스니펫은 항목 델리게이트의 기본 구현을 보여줍니다. 사용자 지정 델리게이트를 구현하기 위한 시작점으로 사용할 수 있습니다.

delegate: Text {
    text: shortName
    font: control.font
    horizontalAlignment: Text.AlignHCenter
    verticalAlignment: Text.AlignVCenter

    required property string shortName
}

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