参照CSS样式表
1,CSS盒子模型:
Margin(边缘,外边距),Border(边界,边框),Padding(填充,内边距),Content(内容)。
注:参照理解,C#Winform控件属性Margin、Padding、BorderStyle的意义
2,样式表语法:
selector { atrribute:value;}
选择器 { 属性:值 ; }
选择器:任意窗口部件。
辅助控制器:indicator、menu-indicator、item、up-button、down-button、up-arrow、down-arrow、drop-arrow、title。
选择器(或者辅助控制器)的状态:disabled、enabled、focus、hover、pressed、checked、unchecked、indeterminate、open、closed、on、off。
QPushButton{
border-radius:20px;
background-color: red;
}
QPushButton:hover {
border-radius:20px;
background-color: yellow;
}
QLCDNumber
{
border-radius:20px;
color: green;
background: silver;
}
QSpinBox
{
border-radius:20px;
color: green;
background: silver;
}