Example: Use TextInput's displayText property instead of length
The replace Text item that is overlayed on the TextInput, behaves
like the TextField.placeholderText property. The opacity of the item
varies based on whether the TextInput has any text or not. Using the
length property to adjust the opacity fails on platforms such as
Android where the length is not updated until the text is committed
(i.e. until you hit the [ENTER] key). Whereas the displayText
property is updated when you key in text, so it is ideal to use the
length of the displayText than the length property itself.
Change-Id: I678e5db5e5d5027e4aae816b6620095c68138eb7
Reviewed-by:
Shawn Rutledge <shawn.rutledge@qt.io>
Showing
Please register or sign in to comment