Reputation: 3592
I want to keep focus on TextField. For example i am typing something then tap to button. The focus on TextField is moving to button, that's why keyboard is automatically hiding on Android. I am using Qt 5.9.2. Thanks in advance!
Upvotes: 0
Views: 2327
Reputation: 24386
In Qt Quick Controls 2, each control has a focusPolicy
property which determines how the control gets focus. The default for controls like Button
is Qt.StrongFocus
, which means that buttons get focus after being clicked or tabbed into. If you're seeing that a control has focus and you don't want it to, just set its focusPolicy
to Qt.NoFocus
:
focusPolicy: Qt.NoFocus
Upvotes: 3