DayOfWeekRow QML Type
1週間の曜日名の列。もっと見る...
Import Statement: | import QtQuick.Controls |
Inherits: |
プロパティ
- delegate : Component
詳細説明
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 を実装することで変更できます。
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) |
以下のスニペットは、itemデリゲートのデフォルト実装です。これは、カスタムデリゲートを実装するための出発点として使用できます。
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.