add password prop handle

This commit is contained in:
王劲鹏
2021-05-31 11:36:49 +08:00
committed by osborn
parent 1291bb17b1
commit 9f721aa1c8
2 changed files with 13 additions and 0 deletions

View File

@@ -89,6 +89,17 @@ TextField {
}
}
property var password: false
onPasswordChanged: {
if (password) {
this.echoMode = TextInput.Password
} else {
this.echoMode = TextInput.Normal
}
}
passwordCharacter: "•"
property var borderWidth: 0
onBorderWidthChanged: {
bg.border.width = borderWidth