このページでは

RowLayout QML Type

GridLayout と同様ですが、行は1行のみです。詳細...

Import Statement: import QtQuick.Layouts
Inherits:

Item

プロパティ

詳細な説明

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

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

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

寸法が表示された、並べて配置された2つの長方形

RowLayout {
    id: layout
    anchors.fill: parent
    spacing: 6
    Rectangle {
        color: 'teal'
        Layout.fillWidth: true
        Layout.minimumWidth: 50
        Layout.preferredWidth: 100
        Layout.maximumWidth: 300
        Layout.minimumHeight: 150
        Text {
            anchors.centerIn: parent
            text: parent.width + 'x' + parent.height
        }
    }
    Rectangle {
        color: 'plum'
        Layout.fillWidth: true
        Layout.minimumWidth: 100
        Layout.preferredWidth: 200
        Layout.preferredHeight: 100
        Text {
            anchors.centerIn: parent
            text: parent.width + 'x' + parent.height
        }
    }
}

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

関連項目: ColumnLayout 、GridLayout 、StackLayout 、Row 、およびQt Quick Layouts Overview。

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

layoutDirection : enumeration [since QtQuick.Layouts 1.1]

このプロパティは、行レイアウトの方向を指定します。これにより、項目が左から右へ配置されるか、右から左へ配置されるかが決まります。Qt.RightToLeft が指定された場合、左揃えの項目は右揃えになり、右揃えの項目は左揃えになります。

指定可能な値:

定数説明
Qt.LeftToRight(デフォルト) 項目は左から右へと配置されます。
Qt.RightToLeft項目は右から左へ配置されます

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

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

spacing : real

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

uniformCellSizes : bool [since QtQuick.Layouts 6.6]

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

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

「 GridLayout::uniformCellWidths 」、「GridLayout::uniformCellHeights 」、および「ColumnLayout::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.