(此图来自Qt官网,我以此为例。)
我想避免一些不重要的小部件以选项卡为中心。
(如果您有一个小部件想要在一些常用的之间快速旋转,则此策略非常有用QLineEdit
输入数据并转义那些很少使用的设置。)
Take the picture as an example, is it possible to exclude Width and Height from tab-ordering list so I can use Tab to rotate only between Name
, Color depth
, OK
and Cancel
? I've searched the document and didn't find the option to remove widgets from tab-ordering list.
改变焦点政策 http://qt-project.org/doc/qt-5/qwidget.html#focusPolicy-prop您不希望出现在 Tab 键顺序列表中的小部件。
如果小部件通过 Tab 键接受键盘焦点,则策略为 Qt::TabFocus。
你必须将其设置为Qt::ClickFocus
or Qt::NoFocus
将其从 Tab 键顺序列表中删除。
了解不同的重点政策有何作用here https://doc.qt.io/qt-5/qt.html#FocusPolicy-enum.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)