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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.