11-13-2012 12:05 PM
I have a textfield defined:
TextField {
id: passwordField
text: password
hintText: qsTr("Password") + Retranslate.onLanguageChanged
inputMode: TextFieldInputMode.Password
}
password is a property defined above, to allow access to the text from outside:
property string password
i want to save the password on click on a button, and check for empty values:
if ("" != passwordField.text) {
//call save in c++
saveToast.show()
} else {
console.log("passwordField.text" + passwordField.text)
}
The field shows the correct value, a number of '*' equal to the password set, but the save check is always wrong and on the console the output is empty:
Debug: passwordField.text
I can enter any text i want in the field, the text attribute seems to be always empty.
Solved! Go to Solution.
11-13-2012 01:47 PM
11-14-2012 03:10 AM
11-14-2012 03:55 AM
simon_hain wrote:...
i want to save the password on click on a button, and check for empty values:
BTW: yxou can also use the Cascades Credentials Dialog where you can only go on if password isn't empty
11-14-2012 03:58 AM