:active 当微件驻留在活动窗口中时,将设置此状态。 :adjoins-item 当 QTreeView (opens new window) 的 ::分支 (opens new window) 与项目相邻时,将设置此状态。 :alternate 当 QAbstractItemView (opens new window) ::alternatingRowColors() 设置为 true 时,对于绘制 QAbstractItemView (opens new window) 行的每个交替行都设置此状态。 :bottom 该项目位于底部。例如,其选项卡位于底部的 QTabBar (opens new window) 。 :checked 该项目已选中。例如,QAbstractButton (opens new window) 的已检查 (opens new window) 状态。 :closable 可以关闭这些项目。例如,QDockWidget (opens new window) 打开了 QDockWidget::DockWidgetClosable (opens new window) 功能。 :closed 项目处于关闭状态。例如,QTreeView (opens new window) 中的非展开项 :default 该项目是默认项目。例如,默认 (opens new window) QPushButton (opens new window) 或 QMenu (opens new window) 中的默认操作。 :disabled 该项目已禁用 (opens new window) 。 :editable QComboBox (opens new window) 是可编辑的。 :edit-focus 该项目具有编辑焦点(请参阅 QStyle::State_HasEditFocus (opens new window) )。此状态仅适用于 Qt 扩展应用程序。 :enabled 该项目已启用 (opens new window) 。 :exclusive 该项是独占项组的一部分。例如,独占 QAction 组中 (opens new window) 的菜单项。 :first 该项目是第一个(在列表中)。例如,QTabBar (opens new window) 中的第一个选项卡。 :flat 项目是扁平的。例如,一个扁平 (opens new window) 的 QPushButton (opens new window) 。 :floatable 项目可以浮动。例如,QDockWidget (opens new window) 打开了 QDockWidget:😄 ockWidgetFloatable (opens new window) 功能。 :focus 该项目具有输入焦点 (opens new window) 。 :has-children 该项目具有子项。例如,QTreeView (opens new window) 中具有子项的项目。 :has-siblings 该项目具有同级。例如,QTreeView (opens new window) 中同级的项目。 :horizontal 项目具有水平方向 :hover 鼠标悬停在项目上。 :indeterminate 项目具有不确定状态。例如,QCheckBox (opens new window) 或 QRadioButton (opens new window) 被部分选中 (opens new window) 。 :last 该项目是最后一个(在列表中)。例如,QTabBar (opens new window) 中的最后一个选项卡。 :left 项目位于左侧。例如,其选项卡位于左侧的 QTabBar (opens new window) 。 :maximized 项目将最大化。例如,最大化的 QMdiSubWindow (opens new window) 。 :middle 项目位于中间(在列表中)。例如,不在 QTabBar (opens new window) 的开头或结尾的选项卡。 :minimized 该项目将被最小化。例如,最小化的 QMdiSubWindow (opens new window) 。 :movable 项目可以四处移动。例如,QDockWidget (opens new window) 打开了 QDockWidget:😄 ockWidgetMovable (opens new window) 功能。 :no-frame 该项目没有框架。例如,无帧 QSpinBox (opens new window) 或 QLineEdit (opens new window) 。 :non-exclusive 物料是非独占物料组的一部分。例如,非独占 QAction 组中 (opens new window) 的菜单项。 :off 对于可以切换的项目,这适用于处于"关闭"状态的项目。 :on 对于可以切换的项目,这适用于处于"打开"状态的小部件。 :only-one 该项目是唯一的(在列表中)。例如,QTabBar (opens new window) 中的一个单独选项卡。 :open 项目处于打开状态。例如,QTreeView (opens new window) 中的展开项,或者具有打开菜单的 QComboBox (opens new window) 或 QPushButton (opens new window) 。 :next-selected 下一项(在列表中)处于选中状态。例如,QTabBar (opens new window) 的选定选项卡位于此项旁边。 :pressed 正在使用鼠标按下项目。 :previous-selected 上一项(在列表中)处于选中状态。例如,QTabBar (opens new window) 中所选选项卡旁边的选项卡。 :read-only 该项目被标记为只读或不可编辑。例如,只读 QLineEdit (opens new window) 或不可编辑的 QComboBox (opens new window) 。 :right 项目位于右侧。例如,其选项卡位于右侧的 QTabBar (opens new window) 。 :selected 项目已被选中。例如,QTabBar (opens new window) 中的选定选项卡或 QMenu (opens new window) 中的选定项。 :top 项目位于顶部。例如,其选项卡位于顶部的 QTabBar (opens new window) 。 :unchecked 该项目处于未选中状态 (opens new window) 。 :vertical 项目具有垂直方向。 :window 小部件是一个窗口(即顶级小部件)