1. 程式人生 > >qt值qss(stylesheet)用法簡介(二)

qt值qss(stylesheet)用法簡介(二)

Pseudo-StateDescription
:active啟用時
:adjoins-itemThis state is set when the ::branch of a QTreeView is adjacent to an item.
:alternate多選擇
:bottom底部
:checked選擇狀態
:closable可關閉
:closed關閉狀態
:default預設
:disabled無效狀態
:editable可編輯的
:edit-focusThe item has edit focus (See QStyle::State_HasEditFocus). This state is available only for Qt    Extended applications.
:enabledThe item is enabled.
:exclusiveThe item is part of an exclusive item group. For example, a menu item in a exclusiveQActionGroup.
:firstThe item is the first (in a list). For example, the first tab in a QTabBar.
:flatThe item is flat. For example, a flat QPushButton.
:floatableThe items can be floated. For example, the QDockWidget has theQDockWidget::DockWidgetFloatable feature turned on.
:focusThe item has input focus.
:has-childrenThe item has children. For example, an item in a QTreeView that has child items.
:has-siblingsThe item has siblings. For example, an item in a QTreeView that siblings.
:horizontalThe item has horizontal orientation
:hoverThe mouse is hovering over the item.
:indeterminateThe item has indeterminate state. For example, a QCheckBox or QRadioButton ispartially checked.
:lastThe item is the last (in a list). For example, the last tab in a QTabBar.
:leftThe item is positioned at the left. For example, a QTabBar that has its tabs positioned atthe left.
:maximizedThe item is maximized. For example, a maximized QMdiSubWindow.
:middleThe item is in the middle (in a list). For example, a tab that is not in the beginning or the end in a QTabBar.
:minimizedThe item is minimized. For example, a minimized QMdiSubWindow.
:movableThe item can be moved around. For example, the QDockWidget has theQDockWidget::DockWidgetMovable feature turned on.
:no-frameThe item has no frame. For example, a frameless QSpinBox or QLineEdit.
:non-exclusiveThe item is part of a non-exclusive item group. For example, a menu item in a non-exclusive QActionGroup.
:offFor items that can be toggled, this applies to items in the "off" state.
:onFor items that can be toggled, this applies to widgets in the "on" state.
:only-oneThe item is the only one (in a list). For example, a lone tab in a QTabBar.
:openThe item is in the open state. For example, an expanded item in a QTreeView, or aQComboBox or QPushButton with an open menu.
:next-selectedThe next item (in a list) is selected. For example, the selected tab of a QTabBar is next tothis item.
:pressedThe item is being pressed using the mouse.
:previous-selectedThe previous item (in a list) is selected. For example, a tab in a QTabBar that is next tothe selected tab.
:read-onlyThe item is marked read only or non-editable. For example, a read only QLineEdit or anon-editable QComboBox.
:rightThe item is positioned at the right. For example, a QTabBar that has its tabs positionedat the right.
:selectedThe item is selected. For example, the selected tab in a QTabBar or the selected item in aQMenu.
:topThe item is positioned at the top. For example, a QTabBar that has its tabs positioned atthe top.
:uncheckedThe item is unchecked.
:verticalThe item has vertical orientation.
:windowThe widget is a window (i.e top level widget)