Utilisation des layout_1

main
Alexis Drai 2 years ago
parent 70af64f35b
commit b5d173902f

@ -1,5 +1,6 @@
import QtQuick 2.0 import QtQuick 2.0
import Sailfish.Silica 1.0 import Sailfish.Silica 1.0
import QtQuick.Layouts 1.1
Page { Page {
id: page id: page
@ -30,7 +31,9 @@ Page {
Column { Column {
id: column id: column
width: parent.width width: parent.width
spacing: 10 spacing: Theme.paddingLarge
anchors.top: pageHeader.bottom
anchors.horizontalCenter: parent.horizontalCenter
Label { Label {
id: firstLabel id: firstLabel
@ -41,20 +44,43 @@ Page {
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
} }
TextField { GridLayout {
id: secondField id: grid
width: parent.width width: parent.width
placeholderText: "Enter text" rows: 2
font.pixelSize: Theme.fontSizeLarge columns: 2
font.bold: true
}
TextField { TextField {
id: thirdField id: field0
width: parent.width Layout.fillWidth: true
placeholderText: "Enter text again" placeholderText: "Enter text"
font.pixelSize: Theme.fontSizeLarge font.pixelSize: Theme.fontSizeLarge
font.bold: true font.bold: true
}
TextField {
id: field1
Layout.fillWidth: true
placeholderText: "Enter text again"
font.pixelSize: Theme.fontSizeLarge
font.bold: true
}
TextField {
id: field2
Layout.fillWidth: true
placeholderText: "Enter text"
font.pixelSize: Theme.fontSizeLarge
font.bold: true
}
TextField {
id: field3
Layout.fillWidth: true
placeholderText: "Enter text again"
font.pixelSize: Theme.fontSizeLarge
font.bold: true
}
} }
} }
} }

Loading…
Cancel
Save