开发者

How to disable Qt dialog default button changing with tab navigation

开发者 https://www.devze.com 2022-12-30 11:00 出处:网络
In Qt 4, by default, tabbing through a dialog changes the default button to be the button tabbed to.This makes tabbing look a bit ugly and distracting as extra redraws take place during tab navigation

In Qt 4, by default, tabbing through a dialog changes the default button to be the button tabbed to. This makes tabbing look a bit ugly and distracting as extra redraws take place during tab navigation which distract from point of user focus.

Is there a way to di开发者_开发技巧sable this Qt functionality and leave the default button unmodified by tab navigation?


QPushButton's autoDefault property is responsible for this behavior. By default it's value is true.

Setting it to false for all relevant buttons will prevent them from becoming default when focused.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号