如题,大佬们,TabWidget的样式表是这样的
QTabWidget::pane{
border:none;
background-color: rgba(0, 0, 0, 0);
}
QTabBar::tab{
font: 15pt "思源黑体 HW";
height:40px;
width:340px;
/*margin-top:2px;
/*margin-right:1px;
margin-left:1px;
margin-bottom:0px;*/
border-radius: 5px;
border-width:1px;
border-style:solid;
border-color:rgba(255,255,255,80);
background-color: rgba(255,255,255,80);
color:rgba(255,255,255,190);
}
QTabWidget::tab-bar { alignment: center; }
QTabBar::tab::selected{
border-radius: 5px;
border-width:1px;
border-style:solid;
border-color:rgba(255,255,255,80);
background-color: rgba(255,255,255,20);
font: 15pt "思源黑体 HW";
color:rgba(255,255,255,255);
}
保存后是这样的

可以看到,背景没有变成透明,但是点击预览后,就能看到正确的设置了,这个怎么解决啊,虽然不影响实际使用,但是想解决这个问题,先感谢大佬们
QTabWidget::pane{
border:none;
background-color: rgba(0, 0, 0, 0);
}
QTabBar::tab{
font: 15pt "思源黑体 HW";
height:40px;
width:340px;
/*margin-top:2px;
/*margin-right:1px;
margin-left:1px;
margin-bottom:0px;*/
border-radius: 5px;
border-width:1px;
border-style:solid;
border-color:rgba(255,255,255,80);
background-color: rgba(255,255,255,80);
color:rgba(255,255,255,190);
}
QTabWidget::tab-bar { alignment: center; }
QTabBar::tab::selected{
border-radius: 5px;
border-width:1px;
border-style:solid;
border-color:rgba(255,255,255,80);
background-color: rgba(255,255,255,20);
font: 15pt "思源黑体 HW";
color:rgba(255,255,255,255);
}
保存后是这样的

可以看到,背景没有变成透明,但是点击预览后,就能看到正确的设置了,这个怎么解决啊,虽然不影响实际使用,但是想解决这个问题,先感谢大佬们