このページでは

ColumnLayout QML Type

GridLayout と同様ですが、列が1つしかありません。詳細...

Import Statement: import QtQuick.Layouts
Inherits:

Item

プロパティ

詳細な説明

このタイプをより効率的に活用するためには、Qt Quick の「Layouts」モジュールの一般的な仕組みを理解しておくことをお勧めします。詳細については、Qt Quick の「Layoutsの概要」を参照してください。

より簡潔なAPIを提供するため、開発者の利便性を考慮して用意されています。

ColumnLayout 内のアイテムは、以下のアタッチドプロパティをサポートしています:

縦に積み重ねられた3つの長方形:赤、緑、青

ColumnLayout{
    spacing: 2

    Rectangle {
        Layout.alignment: Qt.AlignCenter
        color: "red"
        Layout.preferredWidth: 40
        Layout.preferredHeight: 40
    }

    Rectangle {
        Layout.alignment: Qt.AlignRight
        color: "green"
        Layout.preferredWidth: 40
        Layout.preferredHeight: 70
    }

    Rectangle {
        Layout.alignment: Qt.AlignBottom
        Layout.fillHeight: true
        color: "blue"
        Layout.preferredWidth: 70
        Layout.preferredHeight: 40
    }
}

アタッチドプロパティの詳細については、こちらをご覧ください。

「 RowLayout 」、「GridLayout 」、「StackLayout 」、「Column 」、および「Qt Quick Layouts Overview」も参照してください 。

プロパティのドキュメント

layoutDirection : enumeration [since QtQuick.Layouts 1.1]

このプロパティは、カラムレイアウトの配置方向を指定します。カラム内の項目の水平方向の配置を制御します。Qt.RightToLeft が指定された場合、左揃えの項目は右揃えになり、右揃えの項目は左揃えになります。

指定可能な値:

定数説明
Qt.LeftToRight(既定値) 項目は左から右へと配置されます。
Qt.RightToLeft項目は右から左へ配置されます

このプロパティは QtQuick.Layouts 1.1 で導入されました。

関連項目: GridLayout::layoutDirection およびRowLayout::layoutDirection 。

spacing : real

このプロパティは、各セル間の間隔を指定します。デフォルト値は5 です。

uniformCellSizes : bool [since QtQuick.Layouts 6.6]

このプロパティが `true` に設定されている場合、レイアウトはすべてのセルのサイズを均一にするよう強制します。

このプロパティは、QtQuick.Layouts 6.6 で導入されました。

「 GridLayout::uniformCellWidths 」、「GridLayout::uniformCellHeights 」、および「RowLayout::uniformCellSizes 」も参照してください 。

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