QHeaderView
使用::section来控制样式,:该子控件拥有:middle,:fisrt,:last:only-one,:next-selected,:previous-selected,:selectted和checked状态。
QHeaderView::section {
     background-color: qlineargradient( x1:0, y1:0, x2:0, y2:1,
                                   stop:0 #616161, 
                                   stop: 0.5 #505050,
                                   stop: 0.6 #434343, stop:1 #656565);
     color: white;
     padding-left: 4px;
     border: 1px solid #6c6c6c;
}
QHeaderView::section:checked
{
    background-color: red;
}
/* 以下图标,只有在设置允许sortingEnable排序后,点击表头才会出现*/
QHeaderView::down-arrow {
     width:24px;
     height:24px;
     image: url(E:/arrow-down.jpg);
}
QHeaderView::up-arrow {
     width:24px;
     height:24px;
     image: url(E:/arrow-up.jpg);
}背景属性
alternate-background-color:交替背景色
ui->tableWidget->setAlternatingRowColors(true);
 QTableWidget{
 alternate-background-color: blue;
 background: yellow;
 }background:背景属性
支持 QAbstractItemView 子类, QAbstractSpinBox 子类, QCheckBox, QComboBox, QDialog, QFrame, QGroupBox, QLabel, QLineEdit, QMenu, QMenuBar, QPushButton, QRadioButton, QSplitter, QTextEdit, QToolTip, and plain QWidgets.
background-color:控件的背景色
background-image:用于控件的背景图像。如果图像有透明部分则显示透明部分。
background-repeat:设置是如何重复背景图像

QMainWindow {
background-image: url(://logo);
background-repeat: repeat-x;
}background-position:设置背景图像的位置
QLabel {
background-image: url(://logo);
background-repeat: no-repeat;
background-position: center;
}background-attachment:设置背景图像是否固定或者随着页面的其余部分滚动
background-clip:规定背景的绘制区域

我裤子脱了,纸都准备好了,你就给我看这个?https://www.2kdy.com