Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Keep focus on TextField after clearing
eliezedeck last edited by eliezedeck
Using a simple
TextField, I properly get the focus when I try to write inside the field. But once I clear the texts programmatically, like doing
textField.text = ""or
textField.clear(), I lose the focus and I have to manually do
textField.focusin order to regain the focus.
The use case is a simple Chat input text field, which needs to be cleared once the text has been submitted so the user can continue to add more texts.
Of course, the problem with that is this: the Android keyboard disappears and immediately appears again. This is visibly annoying and looks unprofessional. How can I solve this?