我正在使用
QFrame
来创建有色边框,因为我找不到改变 QDialog
颜色的方法。所以当修改 QFrame
的边框时,也会影响到 QLabel
的外观。是否有避免这种情况的方法?
编辑:
这是我使用的样式表,在其中,QLabels
没有任何效果。它正在采用 QFrames
的设置。QWidget {
background-color: black;
}
QLabel {
color:white;
border: solid 2px black;
font: bold 19px Sans Serif;
}
QFrame {
border: solid 2px white;
border-radius: 4px;
}