QPushButton按钮
QPushButton{
color: rgb( 255 , 255 , 255 ) ;
background- color: rgba( 56 , 71 , 115 , 150 ) ;
border- radius: 10px;
padding: 5px;
}
QPushButton: hover{
background- color: rgb( 56 , 71 , 115 ) ;
}
QPushButton: pressed{
background- color:
}
QPushButton: checked{
background- color:
}
QPushButton: disabled{
color: rgb( 161 , 161 , 161 ) ;
background- color: rgba( 218 , 218 , 218 , 100 ) ;
}
QScrollBar 滚动条
/ * 垂直滚动条 * /
QScrollBar: : vertical{
background: transparent;
width: 8px;
border: none;
}
QScrollBar: : add- line: vertical{
background: none;
border: none;
}
QScrollBar: : sub- line: vertical{
background: none;
border: none;
}
QScrollBar: : add- page: vertical{
background: transparent;
border: none;
}
QScrollBar: : sub- page: vertical{
background: transparent;
border: none;
}
QScrollBar: : handle: vertical{
background: rgba( 111 , 134 , 147 , 100 ) ;
border- radius: 4px;
}
QScrollBar: : handle: vertical: hover{
background: rgba( 111 , 134 , 147 , 180 ) ;
}
QScrollBar: : handle: vertical: pressed{
background: rgba( 111 , 134 , 147 , 255 ) ;
}
/ * 水平滚动条 * /
QScrollBar: : horizontal{
background: transparent;
height: 8px;
border: none;
}
QScrollBar: : add- line: horizontal{
background: none;
border: none;
}
QScrollBar: : sub- line: horizontal{
background: none;
border: none;
}
QScrollBar: : add- page: horizontal{
background: transparent;
border: none;
}
QScrollBar: : sub- page: horizontal{
background: transparent;
border: none;
}
QScrollBar: : handle: horizontal{
background: rgba( 111 , 134 , 147 , 100 ) ;
border- radius: 4px;
}
QScrollBar: : handle: horizontal: hover{
background: rgba( 111 , 134 , 147 , 180 ) ;
}
QScrollBar: : handle: horizontal: pressed{
background: rgba( 111 , 134 , 147 , 255 ) ;
}
QTableWidget表格
/ * 表格的一种美化方式* /
QHeaderView{
/ * font- size: 18px; * /
background: transparent;
}
QTableCornerButton: : section{
background: rgb( 126 , 145 , 176 ) ;
}
QHeaderView: : section{
color:
background: rgb( 126 , 145 , 176 ) ;
border: none;
border- left: 1px solid
text- align: center;
padding- left: 2px;
padding- right: 2px;
}
QTableWidget{
background:
border: none;
outline: none;
/ * font- size: 18px; * /
color:
}
QTableWidget: : item{
border- left: 1px solid
border- bottom: 1px solid
}
QTableWidget: : item: : selected{
color: rgb( 0 , 0 , 0 ) ;
background:
}
QTabWidget QTabBar
QTabBar: : tab {
color:
background- color: rgb( 218 , 218 , 218 ) ;
border: 1px solid rgb( 107 , 136 , 179 ) ;
border- bottom: none;
border- top- left- radius: 4px;
border- top- right- radius: 4px;
padding: 4px;
}
QTabBar: : tab: selected {
color:
font- weight: bold
}
QTabBar: : tab: hover {
color:
font- weight: bold;
}
QTabBar: : tab: !selected {
margin- top: 2px; / * make non- selected tabs look smaller * /
}
/ * make use of negative margins for overlapping tabs * /
QTabBar: : tab: selected {
/ * expand/ overlap to the left and right by 4px * /
margin- left: - 4px;
margin- right: - 4px;
}
QTabBar: : tab: first: selected {
margin- left: 0 ; / * the first selected tab has nothing to overlap with on the left * /
}
QTabBar: : tab: last: selected {
margin- right: 0 ; / * the last selected tab has nothing to overlap with on the right * /
}
Menu右键菜单
QMenu{
/ * background- color: rgba( 156 , 178 , 206 , 150 ) ; * /
border: 1px solid
border- radius: 10px;
margin: 0px;
}
QMenu: : item: text{
padding: 3px 25px 3px 25px;
}
/ * QMenu: : item
border- top- left- radius: 10px;
border- top- right- radius: 10px;
background: rgba( 156 , 178 , 206 , 100 ) ;
}
QMenu: : item
border- bottom- left- radius: 10px;
border- bottom- right- radius: 10px;
background: rgba( 156 , 178 , 206 , 255 ) ;
} * /
QMenu: : item: selected: enabled{
border- radius: 10px;
background- color: rgba( 156 , 178 , 206 , 150 ) ;
}
QMenu: : item: selected: !enabled{
background: transparent;
}
QMenu: : separator{
height: 0px;
background: rgb( 56 , 71 , 115 ) ;
margin: 0px;
}