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 |
このプロパティは、カラムレイアウトのレイアウト方向を保持し、アイテムが左から右にレイアウトされるか、右から左にレイアウトされるかを制御します。Qt.RightToLeft
が指定された場合、左揃えの項目は右揃えになり、右揃えの項目は左揃えになる。
可能な値
定数 | 説明 |
---|---|
Qt.LeftToRight | (デ フ ォル ト ) 項目は左か ら 右へ並べ ら れます。 |
Qt.RightToLeft | アイテムは右から左に配置される |
このプロパティは QtQuick.Layouts 1.1 で導入されました。
GridLayout::layoutDirection およびRowLayout::layoutDirectionも参照してください 。
spacing : real |
このプロパティは、各セルの間隔を保持します。デフォルト値は5
です。
uniformCellSizes : bool |
このプロパティをtrue
に設定すると、レイアウトはすべてのセルのサイズを強制的に統一します。
このプロパティは QtQuick.Layouts 6.6 で導入されました。
GridLayout::uniformCellWidths,GridLayout::uniformCellHeights,RowLayout::uniformCellSizesも参照してください 。
© 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.