焦点管理Qt Quick Controls

Qt Quick Controls 中的焦点管理遵循标准的Qt Quick 焦点系统,同时也提供了一些额外的便利。例如, 属性可用于控制控件接收焦点的方式。focusPolicy

焦点范围控件

Qt Quick Controls 提供了一系列可用作焦点范围的控件:

ApplicationWindow

支持页眉和页脚的样式顶层窗口

ComboBox

用于选择选项的组合按钮和弹出列表

MenuBar

提供窗口菜单栏

Page

支持页眉和页脚的样式页面控件

Pane

提供与应用程序风格和主题相匹配的背景

Popup

弹出式用户界面控件的基本类型

RangeSlider

通过沿轨道滑动两个手柄来选择数值范围

ScrollView

可滚动视图

SpinBox

允许用户从一组预设值中进行选择

SplitView

在每个项目之间用可拖动的分割器排列项目

StackView

提供基于堆栈的导航模型

SwipeView

允许用户通过横向滑动浏览页面

TabBar

允许用户在不同视图或子任务之间切换

另请参阅 Qt Quick 中的键盘焦点

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.