alternate-background-color |
Brush |
用于QAbstractItemView 子类。 如果未设置此属性,则默认值是为调色板设置的值AlternateBase 角色。 可参考background 和selection-background-color 。 |
background |
Background |
设置背景,相当于指定background-color 、background-image 、
background-repeat 和background-position 。 此属性支持以下控件:QAbstractItemView子类 ,QAbstractSpinBox子类 ,QCheckBox ,QComboBox ,QDialog ,QFrame ,QGroupBox ,QLabel ,QLineEdit ,QMenu ,QMenuBar ,QPushButton ,QRadioButton ,QSplitter ,QTextEdit ,QToolTip 和QWidget 。 可参考background-origin ,selection-background-color ,background-attachment ,background-clip 和alternate-background-color 。 |
background-color |
Brush |
设置某个小部件的背景颜色 |
background-image |
Url |
设置某个小部件的背景图像 |
background-repeat |
Repeat |
是否以及如何重复背景图像来填充background-origin 矩形。 如果未指定此属性,则背景图像在x ,y 两个方向上重复。 |
background-position |
Alignment |
背景图像在background-origin 矩形内的对齐方式。如果未指定此属性,则对齐方式为top left 。 |
background-attachment |
Attachment |
确定背景图像是否在QAbstractScrollArea 相对于视口滚动或固定。默认情况下,背景图像随视口滚动。 |
background-clip |
Origin |
小部件的矩形,在其中background 绘制 。此属性指定区域将background-color 和
background-image 剪裁。 此属性支持以下控件:QAbstractItemView子类 ,QAbstractSpinBox子类 ,QCheckBox ,QComboBox ,QDialog ,QFrame ,QGroupBox ,QLabel ,QPushButton ,QRadioButton ,QSplitter ,QTextEdit ,QToolTip 和QWidget 。 如果未指定此属性,则默认为border 。 |
background-origin |
Origin |
小部件的背景矩形,与background-position 和background-image 一起使用。 此属性支持以下控件:QAbstractItemView子类 ,QAbstractSpinBox子类 ,QCheckBox ,QComboBox ,QDialog ,QFrame ,QGroupBox ,QLabel ,QPushButton ,QRadioButton ,QSplitter ,QTextEdit ,QToolTip 、和QWidget 。 如果未指定此属性,则默认为padding 。 |
border |
Border |
设置小部件边框。相当于指定border-color 、border-style 和border-width 。 此属性支持以下控件:QAbstractItemView子类 ,QAbstractSpinBox子类 ,QCheckBox ,QComboBox ,QFrame ,QGroupBox ,QLabel ,QLineEdit ,QMenu ,QMenuBar ,QPushButton ,QRadioButton ,QSplitter ,QTextEdit ,QToolTip 和QWidget 。 |
border-top |
Border |
设置小部件顶部边框。相当于指定border-top-color 、border-top-style 和border-top-width 。 |
border-right |
Border |
设置小部件右部边框。相当于指定border-right-color 、border-right-style 和border-right-width 。 |
border-bottom |
Border |
设置小部件底部边框。相当于指定border-bottom-color 、border-bottom-style 和
border-bottom-width 。 |
border-left |
Border |
设置小部件左部边框。相当于指定border-left-color 、border-left-style 和border-left-width 。 |
border-color |
Box Colors |
设置所有边框边缘的颜色。相当于指定border-top-color 、border-right-color 、border-bottom-color 和border-left-color 。 此属性支持以下控件:QAbstractItemView子类 ,QAbstractSpinBox子类 ,QCheckBox ,
QComboBox ,QFrame ,QGroupBox ,QLabel ,QLineEdit ,QMenu ,QMenuBar ,QPushButton ,QRadioButton ,QSplitter ,QTextEdit ,QToolTip 和QWidget 。 如果未指定此属性,则默认为color (即小部件的前景色)。 |
border-top-color |
Brush |
边框上边缘的颜色 |
border-right-color |
Brush |
边框右边缘的颜色 |
border-bottom-color |
Brush |
边框底边缘的颜色 |
border-left-color |
Brush |
边框左边缘的颜色 |
border-image |
Border Image |
填充边框的图像。图像被切割成九个部分,并在必要时适当拉伸。 此属性支持以下控件:QAbstractItemView子类 ,QAbstractSpinBox子类 ,QCheckBox ,QComboBox ,QFrame ,QGroupBox ,QLabel ,QLineEdit ,QMenu ,QMenuBar ,QPushButton ,QRadioButton ,QSplitter ,QTextEdit 和QToolTip 。 可参考border-color ,border-style ,border-width 和The Box Model 。 |
border-radius |
Radius |
边框角的半径。相当于指定border-top-left-radius 、border-top-right-radius 、border-bottom-right-radius 和border-bottom-left-radius 。裁剪小部件的background 。 此属性支持以下控件:QAbstractItemView子类 ,QAbstractSpinBox子类 ,QCheckBox ,QComboBox ,QFrame ,QGroupBox ,QLabel ,QLineEdit ,QMenu ,QMenuBar ,QPushButton ,QRadioButton ,QSplitter ,QTextEdit 和QToolTip 。 如果未指定此属性,则默认为 0。 |
border-top-left-radius |
Radius |
边框左上角的半径。 |
border-top-right-radius |
Radius |
边框右上角的半径。 |
border-bottom-left-radius |
Radius |
边框左下角的半径。将此属性设置为正值会产生圆角。 |
border-bottom-right-radius |
Radius |
边框右下角的半径。将此属性设置为正值会产生圆角。 |
border-style |
Border Style |
所有边框边缘的样式。 此属性支持以下控件:QAbstractItemView子类 ,QAbstractSpinBox子类 ,QCheckBox ,QComboBox ,QFrame ,QGroupBox ,QLabel ,QLineEdit ,QMenu ,QMenuBar ,QPushButton ,QRadioButton ,QSplitter ,QTextEdit 和QToolTip 。 如果未指定此属性,则默认为none 。 |
border-top-style |
Border Style |
边框上边缘的样式。 |
border-right-style |
Border Style |
边框右边缘的样式。 |
border-bottom-style |
Border Style |
边框下边缘的样式。 |
border-left-style |
Border Style |
边框左边缘的样式。 |
border-width |
Box Lengths |
边框的宽度。相当于设置border-top-width 、border-right-width 、border-bottom-width 和border-left-width 。 此属性支持以下控件:QAbstractItemView子类 ,QAbstractSpinBox子类 ,QCheckBox ,QComboBox ,QFrame ,QGroupBox ,QLabel ,QLineEdit ,QMenu ,QMenuBar ,QPushButton ,QRadioButton ,QSplitter ,QTextEdit 和QToolTip 。 也可参考border-color ,border-radius ,border-style ,border-image 和The Box Model 。 |
border-top-width |
Length |
边框上边缘的宽度。 |
border-right-width |
Length |
边框右边缘的宽度。 |
border-bottom-width |
Length |
边框下边缘的宽度。 |
border-left-width |
Length |
边框左边缘的宽度。 |
bottom |
Length |
如果position 是绝对的,将子控件向上移动一定的偏移量;指定bottom:y 等同于指定top:-y 。 如果position 是绝对的,该bottom 属性指定子控件的下边缘相对于父控件的下边缘(另请参见subcontrol-origin )。 可参考left ,right ,top 。 |
button-layout |
Number |
按钮的布局QDialogButtonBox 或QMessageBox 。可能的值为 0 (WinLayout ), 1 (MacLayout ), 2 (KdeLayout ), 3 (GnomeLayout ) 和 5 (AndroidLayout )。 如果未指定此属性,则默认为SH_DialogButtonLayout 样式提示的当前样式指定的值。 |
color |
Brush |
用于渲染文本的颜色。所有遵守该属性的小部件都支持此属性QWidget::palette 。 如果未设置此属性,则默认值是小部件调色板中为QWidget::foregroundRole (通常为黑色)。 |
dialogbuttonbox-buttons-have-icons |
Boolean |
按钮是否位于QDialogButtonBox 显示图标。如果该属性设置为1 ,则显示图标;如果设置为0 ,则不显示图标。请参阅图标清单有关如何设置图标的信息部分。 注意: 定义此属性的样式必须在QDialogButtonBox被建造; 这意味着您必须将样式应用于父窗口小部件或应用程序本身。 |
font |
Font |
用于设置文本字体的速记符号。相当于指定font-family 、font-size 、font-style 和font-weight 。 所有遵守该属性的小部件都支持此属性QWidget::font 。 如果未设置该属性,则默认为QWidget::font 。 |
font-family |
String |
字体系列 |
font-size |
Font Size |
字体大小。Qt5.15版本,仅支持 pt 和 px 度量 |
font-style |
Font Style |
字体样式 |
font-weight |
Font Weight |
字体宽度 |
gridline-color *
|
Color |
QTableView 中轴线的颜色。 如果未指定此属性,则默认为SH_Table_GridLineColor 样式提示的当前样式指定的值。 |
height |
Length |
子控件(或者在某些情况下,小部件)的高度。 如果未指定此属性,则默认为取决于子控件/小部件和当前样式的值。 警告: 除非另有说明,否则在窗口小部件上设置此属性时不起作用。如果您想要一个具有固定高度的小部件,请将最小高度和最大高度设置为相同的值。 可参考width 。 |
icon |
Url |
对于具有图标的小部件,使用的图标。 目前唯一支持此属性的小部件是QPushButton 。 注意: 应用程序负责为按钮分配图标(使用QAbstractButton API ),而不是样式的图标。因此,除非您的样式表针对特定的应用程序,否则请小心设置它。 |
icon-size |
Length |
小部件中图标的宽度和高度。 此属性支持以下控件:QCheckBox ,QListView ,QPushButton ,QRadioButton ,QTabBar ,QToolBar ,QToolBox ,QTreeView
|
image *
|
Url |
在子控件的内容矩形中绘制的图像。
image 属性接受Url 或svg 的列表。使用与QIcon 相同的算法来确定绘制的实际图像(即,图像从不按比例放大,而是在必要时按比例缩小。如果指定了svg ,则图像将缩放为内容矩形的大小。 在子控件上设置image 属性会隐式设置子控件的宽度和高度(除非是SVG 中的图像)。 在Qt 4.3及更高版本中,可以使用图像位置来指定图像在矩形内的对齐。 此属性仅用于子控件,不支持其他元素使用它。 警告: 渲染SVG图像 需要QIcon SVG 插件。 |
image-position |
Alignment |
在 Qt 4.3 及更高版本中,可以使用相对或绝对位置来指定图像图像位置的对齐方式。 |
left |
Length |
如果position 是相对的,则子控件向右移动一定的偏移量; 如果position 是绝对的,该left 属性指定子控件的左边缘相对于父控件的左边缘(另请参见subcontrol-origin )。 如果未指定此属性,则默认为0。 可参考buttom ,right ,top
|
lineedit-password-character *
|
Number |
QLineEdit 作为Unicode数字的密码字符。 如果未指定此属性,则默认为当前样式指定的值SH_LineEdit_PasswordCharacter 风格提示。 |
lineedit-password-mask-delay *
|
Number |
QLineEdit 密码掩码延迟之前的毫秒数lineedit-password-character 应用于可见字符。 如果未指定此属性,则默认为当前样式指定的值SH_LineEdit_PasswordMaskDelay 风格提示。 |
margin |
Box Lengths |
小部件的边距。相当于指定margin-top 、margin-right 、margin-bottom 和margin-left 。 此属性支持以下控件:QAbstractItemView子类 ,QAbstractSpinBox子类 ,QCheckBox ,QComboBox ,QFrame ,QGroupBox ,QLabel ,QLineEdit ,QMenu ,QMenuBar ,QPushButton ,QRadioButton ,QSplitter ,QTextEdit 和QToolTip 。 如果未指定此属性,则默认为0。该属性是在 Qt 5.4 中添加的。 |
margin-top |
Length |
小部件的上边距。 |
margin-right |
Length |
小部件的右边距。 |
margin-bottom |
Length |
小部件的下边距。 |
margin-left |
Length |
小部件的左边距。 |
max-height |
Length |
小部件或子控件的最大高度。 此属性支持以下控件:QAbstractItemView子类 ,QAbstractSpinBox子类 ,QCheckBox ,QComboBox ,QFrame ,QGroupBox ,QLabel ,QLineEdit ,QMenu ,QMenuBar ,QPushButton ,QRadioButton ,QSizeGrip ,QSpinBox ,QSplitter ,QStatusBar ,QTextEdit 和QToolTip 。 该值相对于The Box Model 中的contents rect 。 |
max-width |
Length |
小部件或子控件的最大宽度。 此属性支持以下控件:QAbstractItemView子类 ,QAbstractSpinBox子类 ,QCheckBox ,QComboBox ,QFrame ,QGroupBox ,QLabel ,QLineEdit ,QMenu ,QMenuBar ,QPushButton ,QRadioButton ,QSizeGrip ,QSpinBox ,QSplitter ,QStatusBar ,QTextEdit 和QToolTip 。 该值相对于The Box Model 中的contents rect 。 |
messagebox-text-interaction-flags *
|
Number |
消息框中文本的交互行为。可能的值基于Qt::TextInteractionFlags 。 如果未指定此属性,则默认为当前样式指定的值SH_MessageBox_TextInteractionFlags 风格提示。 |
min-height |
Length |
小部件或子控件的最小高度。 此属性支持以下控件:QAbstractItemView子类 ,QAbstractSpinBox子类 ,QCheckBox ,QComboBox ,QFrame ,QGroupBox ,QLabel ,QLineEdit ,QMenu ,QMenuBar ,QPushButton ,QRadioButton ,QSizeGrip ,QSpinBox ,QSplitter ,QStatusBar ,QTextEdit 和QToolTip 。 该值相对于The Box Model 中的contents rect 。 如果未指定此属性,则根据小部件的内容和样式派生最小高度。 |
min-width |
Length |
小部件或子控件的最小宽度。 此属性支持以下控件:QAbstractItemView子类 ,QAbstractSpinBox子类 ,QCheckBox ,QComboBox ,QFrame ,QGroupBox ,QLabel ,QLineEdit ,QMenu ,QMenuBar ,QPushButton ,QRadioButton ,QSizeGrip ,QSpinBox ,QSplitter ,QStatusBar ,QTextEdit 和QToolTip 。 该值相对于The Box Model 中的contents rect 。 如果未指定此属性,则根据小部件的内容和样式派生最小宽度。 |
opacity *
|
Number |
小部件的不透明度。可能的值从0 (透明)到 255 (不透明)。目前,仅支持QToolTip 。 如果未指定此属性,则默认为当前样式指定的值SH_ToolTipLabel_Opacity 风格提示。 |
outline |
|
围绕对象边界绘制的轮廓。 |
outline-color |
Color |
轮廓的颜色。可参考border-color
|
outline-offset |
Length |
轮廓相对于小部件边框的偏移量。 |
outline-style |
|
指定用于绘制轮廓的图案。可参考border-style
|
outline-radius |
|
为轮廓添加圆角 |
outline-bottom-left-radius |
Radius |
轮廓左下圆角的半径。 |
outline-bottom-right-radius |
Radius |
轮廓右下圆角的半径。 |
outline-top-left-radius |
Radius |
轮廓左上圆角的半径。 |
outline-top-right-radius |
Radius |
轮廓右上圆角的半径。 |
padding |
Box Lengths |
小部件的填充。相当于指定padding-top 、padding-right 、padding-bottom 和padding-left 。 此属性支持以下控件:QAbstractItemView子类 ,QAbstractSpinBox子类 ,QCheckBox ,QComboBox ,QFrame ,QGroupBox ,QLabel ,QLineEdit ,QMenu ,QMenuBar ,QPushButton ,QRadioButton ,QSplitter ,QTextEdit 和QToolTip 。 如果未指定此属性,则默认为0。 |
padding-top |
Length |
小部件的顶部填充。 |
padding-right |
Length |
小部件的右填充。 |
padding-bottom |
Length |
小部件的底部填充。 |
padding-left |
Length |
小部件的左填充。 |
paint-alternating-row-colors-for-empty-area |
bool |
QTreeView 是否为空区域(即没有项目的区域)绘制交替的行颜色 |
position |
relative
absolute
|
是否使用指定偏移量left ,right ,top 和bottom 是相对或绝对坐标。 如果未指定此属性,则默认为relative 。 |
right |
Length |
如果position 是绝对的,将子控件向左移动一定的偏移量;指定right:y 等同于指定left:-y 。 如果position 是绝对的,该right 属性指定子控件的右边缘相对于父控件的右边缘(另请参见subcontrol-origin )。 可参考left ,bottom ,top 。 |
selection-background-color *
|
Brush |
所选文本或项目的背景。 所有遵守该属性的小部件都支持此属QWidget::palette 并显示选择文本。 如果未设置此属性,则默认值是为调色板设置的值Highlight 角色。 |
selection-color *
|
Brush |
所选文本或项目的前景。 所有遵守该属性的小部件都支持此属性QWidget::palette 并显示选择文本。 如果未设置此属性,则默认值是为调色板设置的值HighlightedText 角色。 |
show-decoration-selected *
|
Boolean |
控制是否选择QListView 覆盖整行或仅覆盖文本范围。 如果未指定此属性,则默认为当前样式指定的值SH_ItemView_ShowDecorationSelected 风格提示。 |
spacing *
|
Length |
小部件中的内部间距。 此属性支持以下控件:QCheckBox , 可检查的QGroupBoxes ,QMenuBar 和QRadioButton 。 如果未指定此属性,则默认值取决于小部件和当前样式。 |
subcontrol-origin *
|
Origin |
父元素内子控件的原始矩形。 如果未指定此属性,则默认为padding 。 |
subcontrol-position *
|
Alignment |
子控件在由子控件原点指定的原点矩形内的对齐。 如果未指定此属性,则默认值取决于子控件。 |
titlebar-show-tooltips-on-buttons |
bool |
工具提示是否显示在窗口标题栏按钮上。 |
widget-animation-duration *
|
Number |
动画应持续多长时间(以毫秒为单位)。值为零意味着动画将被禁用。 如果未指定此属性,则默认为当前样式指定的值SH_Widget_Animation_Duration 风格提示。 该属性是在 Qt 5.10 中添加的。 |
text-align |
Alignment |
小部件内容中文本和图标的对齐方式。 如果未指定此值,则默认为取决于本机样式的值。 |
text-decoration |
none
underline
overline
line-through
|
附加文字效果 |
top |
Length |
如果position 是绝对的,将子控件向下移动一定的偏移量; 如果position 是绝对的,该top 属性指定子控件的上边缘相对于父控件的上边缘(另请参见subcontrol-origin )。 可参考left ,bottom ,right 。 |
width |
Length |
子控件(或者在某些情况下,小部件)的宽度。 如果未指定此属性,则默认为取决于子控件/小部件和当前样式的值。 警告: 除非另有说明,否则在窗口小部件上设置此属性时不起作用。如果您想要一个具有固定宽度的小部件,请将最小宽度和最大宽度设置为相同的值。 可参考height 。 |
-qt-background-role |
PaletteRole |
用于background-color 基于所选角色的子控件或小部件。 |
-qt-style-features |
list |
要应用 Qt 特定样式的 CSS 属性列表。 注意: 只能list 包含不基于像素图的属性。 |