replace FlickableType with ListViewType in PageSetupWizardTextKey

This commit is contained in:
Cyril Anisimov
2025-07-26 16:05:46 +02:00
parent 9817ad6daf
commit ca224b22fa
+36 -20
View File
@@ -13,25 +13,31 @@ import "../Config"
PageType {
id: root
FlickableType {
id: fl
anchors.top: parent.top
anchors.bottom: parent.bottom
contentHeight: content.height
ColumnLayout {
id: content
BackButtonType {
id: backButton
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
anchors.topMargin: 20
spacing: 16
BackButtonType {
id: backButton
Layout.topMargin: 20
onFocusChanged: {
if (this.activeFocus) {
listView.positionViewAtBeginning()
}
}
}
ListViewType {
id: listView
anchors.top: backButton.bottom
anchors.bottom: parent.bottom
anchors.right: parent.right
anchors.left: parent.left
header: ColumnLayout {
width: listView.width
BaseHeaderType {
Layout.fillWidth: true
@@ -41,6 +47,13 @@ PageType {
headerText: qsTr("Connection key")
descriptionText: qsTr("A line that starts with vpn://...")
}
}
spacing: 16
model: 1 // fake model to force the ListView to be created without a model
delegate: ColumnLayout {
width: listView.width
TextFieldWithHeaderType {
id: textKey
@@ -60,17 +73,18 @@ PageType {
}
}
}
}
footer: ColumnLayout {
width: listView.width
BasicButtonType {
id: continueButton
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.right: parent.right
anchors.rightMargin: 16
anchors.leftMargin: 16
anchors.bottomMargin: 32
Layout.fillWidth: true
Layout.rightMargin: 16
Layout.leftMargin: 16
Layout.topMargin: 16
Layout.bottomMargin: 32
text: qsTr("Continue")
@@ -81,3 +95,5 @@ PageType {
}
}
}
}
}