이 페이지에서

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
    }
}

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

MonthGrid 및 WeekNumberColumn도 참조하십시오 .

속성 설명서

delegate : Component

이 속성은 요일별로 데이터를 시각화하는 항목 델리게이트를 포함합니다.

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

model.day: int요일 (Qt::DayOfWeek)
model.longName: string요일 이름의 전체 표기; 예: "Monday" (QLocale::LongFormat)
model.shortName: string요일 이름의 짧은 버전; 예: "Mon" (QLocale::ShortFormat)
model.narrowName: string공간이 제한될 때 사용되는 요일 이름의 특수 버전입니다. 예를 들어, "M" (QLocale::NarrowFormat)

다음 코드 조각은 항목 델리게이트의 기본 구현을 보여줍니다. 이 코드는 사용자 정의 델리게이트를 구현할 때 출발점으로 사용할 수 있습니다.

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

    required property string shortName
}

DayOfWeekRow 이 함수는 델리게이트의 소유권을 인수하지 않습니다.

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