| 278行目: | 278行目: | ||
==== サンプルコード ==== | ==== サンプルコード ==== | ||
以下の例は、<code>RowLayout</code>のサンプルコードである。<br> | |||
[[ファイル:QML RowLayout 1.png|フレームなし|中央]] | |||
<syntaxhighlight lang="qml"> | <syntaxhighlight lang="qml"> | ||
RowLayout { | RowLayout { | ||
| 284行目: | 285行目: | ||
anchors.fill: parent | anchors.fill: parent | ||
spacing: 6 | spacing: 6 | ||
Rectangle { | Rectangle { | ||
color: 'teal' | color: 'teal' | ||
| 291行目: | 293行目: | ||
Layout.maximumWidth: 300 | Layout.maximumWidth: 300 | ||
Layout.minimumHeight: 150 | Layout.minimumHeight: 150 | ||
Text { | Text { | ||
anchors.centerIn: parent | anchors.centerIn: parent | ||
| 303行目: | 306行目: | ||
Layout.preferredWidth: 200 | Layout.preferredWidth: 200 | ||
Layout.preferredHeight: 100 | Layout.preferredHeight: 100 | ||
Text { | Text { | ||
anchors.centerIn: parent | anchors.centerIn: parent | ||