How to highlight the TextField which has no text ?
Unsolved
QML and Qt Quick
-
Hi All,
in my qml application i have few textfields which takes user inputs like name,age,hobbies etc.suppose if user missed to enter any textfield, my application should highlight those fields which doesn't contain any text .how can i achieve this?any textfield property is there to do it?
-
There is nothing specific. Just check the empty string value using text property of TextField. If it is empty string, then put rectangle highlighter around the text field.
-
You are right. There is no highlight property. Please note that highlighting the fields which don't have any values is our logic. We can make the component with TextField wrapped around in Rectangle. Highlight it whenever required.