2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
2022-12-21 10:12:09 +01:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2014-10-14 11:32:43 +02:00
|
|
|
|
|
|
|
|
import QtQuick 2.2
|
|
|
|
|
import QtQuick.Controls 1.2
|
|
|
|
|
import QtQuick.Layouts 1.0
|
|
|
|
|
|
|
|
|
|
Item {
|
|
|
|
|
id:root
|
|
|
|
|
|
|
|
|
|
width: 600
|
|
|
|
|
height: 300
|
|
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
|
id: mainLayout
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
spacing: 4
|
|
|
|
|
GroupBox {
|
|
|
|
|
id: rowBox
|
|
|
|
|
title: "Row layout"
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
RowLayout {
|
|
|
|
|
id: rowLayout
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
TextField {
|
|
|
|
|
placeholderText: "This wants to grow horizontally"
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
}
|
|
|
|
|
Button {
|
|
|
|
|
text: "Button"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
GroupBox {
|
|
|
|
|
id: gridBox
|
|
|
|
|
title: "Grid layout"
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
|
|
|
|
GridLayout {
|
|
|
|
|
id: gridLayout
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
rows: 3
|
|
|
|
|
flow: GridLayout.TopToBottom
|
|
|
|
|
|
|
|
|
|
Label { text: "Line 1" }
|
|
|
|
|
Label { text: "Line 2" }
|
|
|
|
|
Label { text: "Line 3" }
|
|
|
|
|
|
|
|
|
|
TextField { }
|
|
|
|
|
TextField { }
|
|
|
|
|
TextField { }
|
|
|
|
|
|
|
|
|
|
TextArea {
|
|
|
|
|
text: "This widget spans over three rows in the GridLayout.\n"
|
|
|
|
|
+ "All items in the GridLayout are implicitly positioned from top to bottom."
|
|
|
|
|
Layout.rowSpan: 3
|
|
|
|
|
Layout.fillHeight: true
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
TextArea {
|
|
|
|
|
id: t3
|
|
|
|
|
text: "This fills the whole cell"
|
|
|
|
|
Layout.minimumHeight: 30
|
|
|
|
|
Layout.fillHeight: true
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|