• 8125阅读
  • 2回复

qss的问题 [复制链接]

上一主题 下一主题
离线lencho
 
只看楼主 倒序阅读 楼主  发表于: 2007-04-03
— 本帖被 XChinux 执行加亮操作(2008-07-20) —
请问如何使用qss来设置QTableWidget的headview的背景图片
这样写没效果
QHeaderView
{
        background-image: url(:/Resources/head.png);
    background-repeat: repeat-x;

}
这样也不行
QTableWidgetItem
{
        background-image: url(:/Resources/head.png);
    background-repeat: repeat-x;

}
请问这个问题应该怎么解决呢
离线jepson

只看该作者 1楼 发表于: 2009-03-10
QHeaderView::section {
     padding-left: 2px;
     padding-right: 4px;
     background-color: #FFF7DB;
     border-width: 1px;
     border-color: darkkhaki;
     border-style: solid;
}
  
QHeaderView::section:hover {
    background-color: #FFDF94;
}
  
/* Increase the padding, so the text is shifted when the button is
    pressed. */
QHeaderView::section:pressed {
     padding-left: 4px;
     padding-top: 4px;
     background-color: #E6A84C;
}
离线forceruler

只看该作者 2楼 发表于: 2009-07-14
QHeaderView:section {...}
快速回复
限100 字节
 
上一个 下一个