ColumnLayout QML Type
GridLayout と同じだが、列が1つしかない。さらに...
| Import Statement: | import QtQuick.Layouts |
| Inherits: |
プロパティ
- layoutDirection : enumeration
(since QtQuick.Layouts 1.1) - spacing : real
- uniformCellSizes : bool
(since QtQuick.Layouts 6.6)
詳細説明
この型をより効率的に使うためには、Qt Quick Layouts モジュールの一般的な仕組みを理解しておくことをお勧めする。詳しくはQt Quick Layouts 概要を参照。
この型は、よりクリーンなAPIを提供するため、開発者の便宜のために用意されています。
ColumnLayoutのアイテムは、これらの付属プロパティをサポートしています:
- Layout.minimumWidth
- Layout.minimumHeight
- Layout.preferredWidth
- Layout.preferredHeight
- Layout.maximumWidth
- Layout.maximumHeight
- Layout.fillWidth
- Layout.fillHeight
- Layout.alignment
- Layout.margins
- Layout.leftMargin
- Layout.rightMargin
- Layout.topMargin
- Layout.bottomMargin
- Layout.horizontalStretchFactor
- Layout.verticalStretchFactor

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.