mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
QML UI: make sure textfields loose focus
For some reason the textfields on dive edit page did not loose focus when editing ended by press on the return key. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
This commit is contained in:
parent
97f1dc0b01
commit
bc7d11860f
1 changed files with 33 additions and 0 deletions
|
@ -96,6 +96,9 @@ Item {
|
||||||
TextField {
|
TextField {
|
||||||
id: txtDate;
|
id: txtDate;
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
onEditingFinished: {
|
||||||
|
focus = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Kirigami.Label {
|
Kirigami.Label {
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
|
@ -105,6 +108,9 @@ Item {
|
||||||
TextField {
|
TextField {
|
||||||
id: txtLocation;
|
id: txtLocation;
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
onEditingFinished: {
|
||||||
|
focus = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.Label {
|
Kirigami.Label {
|
||||||
|
@ -115,6 +121,9 @@ Item {
|
||||||
TextField {
|
TextField {
|
||||||
id: txtGps
|
id: txtGps
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
onEditingFinished: {
|
||||||
|
focus = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.Label {
|
Kirigami.Label {
|
||||||
|
@ -141,6 +150,9 @@ Item {
|
||||||
id: txtDepth
|
id: txtDepth
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
validator: RegExpValidator { regExp: /[^-]*/ }
|
validator: RegExpValidator { regExp: /[^-]*/ }
|
||||||
|
onEditingFinished: {
|
||||||
|
focus = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Kirigami.Label {
|
Kirigami.Label {
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
|
@ -151,6 +163,9 @@ Item {
|
||||||
id: txtDuration
|
id: txtDuration
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
validator: RegExpValidator { regExp: /[^-]*/ }
|
validator: RegExpValidator { regExp: /[^-]*/ }
|
||||||
|
onEditingFinished: {
|
||||||
|
focus = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.Label {
|
Kirigami.Label {
|
||||||
|
@ -161,6 +176,9 @@ Item {
|
||||||
TextField {
|
TextField {
|
||||||
id: txtAirTemp
|
id: txtAirTemp
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
onEditingFinished: {
|
||||||
|
focus = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.Label {
|
Kirigami.Label {
|
||||||
|
@ -171,6 +189,9 @@ Item {
|
||||||
TextField {
|
TextField {
|
||||||
id: txtWaterTemp
|
id: txtWaterTemp
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
onEditingFinished: {
|
||||||
|
focus = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.Label {
|
Kirigami.Label {
|
||||||
|
@ -218,6 +239,9 @@ Item {
|
||||||
id: txtWeight
|
id: txtWeight
|
||||||
readOnly: text === "cannot edit multiple weight systems"
|
readOnly: text === "cannot edit multiple weight systems"
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
onEditingFinished: {
|
||||||
|
focus = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.Label {
|
Kirigami.Label {
|
||||||
|
@ -241,6 +265,9 @@ Item {
|
||||||
id: txtGasMix
|
id: txtGasMix
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
validator: RegExpValidator { regExp: /(EAN100|EAN\d\d|AIR|100|\d{1,2}|\d{1,2}\/\d{1,2})/i }
|
validator: RegExpValidator { regExp: /(EAN100|EAN\d\d|AIR|100|\d{1,2}|\d{1,2}\/\d{1,2})/i }
|
||||||
|
onEditingFinished: {
|
||||||
|
focus = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.Label {
|
Kirigami.Label {
|
||||||
|
@ -251,6 +278,9 @@ Item {
|
||||||
TextField {
|
TextField {
|
||||||
id: txtStartPressure
|
id: txtStartPressure
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
onEditingFinished: {
|
||||||
|
focus = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.Label {
|
Kirigami.Label {
|
||||||
|
@ -261,6 +291,9 @@ Item {
|
||||||
TextField {
|
TextField {
|
||||||
id: txtEndPressure
|
id: txtEndPressure
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
onEditingFinished: {
|
||||||
|
focus = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.Label {
|
Kirigami.Label {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue