HPasswordPopup: enable OK if password not empty
This commit is contained in:
parent
e5893c5569
commit
7f995c749f
|
@ -14,11 +14,14 @@ HPopup {
|
|||
property alias details: details
|
||||
property bool okClicked: false
|
||||
|
||||
property string okText: qsTr("OK")
|
||||
property bool okEnabled: true
|
||||
|
||||
|
||||
box.focusButton: "ok"
|
||||
box.clickButtonOnEnter: "ok"
|
||||
box.buttonModel: [
|
||||
{ name: "ok", text: qsTr("OK"), iconName: "ok" },
|
||||
{ name: "ok", text: okText, iconName: "ok" , enabled: okEnabled},
|
||||
{ name: "cancel", text: qsTr("Cancel"), iconName: "cancel" },
|
||||
]
|
||||
box.buttonCallbacks: ({
|
||||
|
|
|
@ -5,6 +5,7 @@ import "../SidePane"
|
|||
|
||||
HBoxPopup {
|
||||
id: popup
|
||||
okEnabled: Boolean(passwordField.text)
|
||||
|
||||
onAboutToShow: {
|
||||
okClicked = false
|
||||
|
|
Loading…
Reference in New Issue
Block a user