Clear text all TextField
-
Hi,
I'd like to clear the text of "TextField" controls with a simple code, Instead of using the following code:textField1.text=""; textField2.text=""; textField3.text=""; textField4.text=""; ... .... .... textFieldn.text="";I've tried to use this code:
Qt.inputMethod.reset()But it does not work.
-
You may have to collect them in one container, e.g.:
readonly property var textFieldsList: [textField1, textField2, ...], and then iterate over them via JavaScriptArray.forEachand callclearfor every element. -
You may have to collect them in one container, e.g.:
readonly property var textFieldsList: [textField1, textField2, ...], and then iterate over them via JavaScriptArray.forEachand callclearfor every element.Thank you