1.整个控件设置
QGroupBox {
border:2px solid rgb(53, 153, 252);
}
2.控件标题部分,subcontrol-position:标题位置
left:标题距离左边线的距离QGroupBox::title {
color: rgb(0, 0, 0);
subcontrol-origin: margin;
subcontrol-position: top left;
left:10px;
top:0px;
padding: 0px;
}
3.标题前方指示符设置,本次用checkbox
QGroupBox::indicator {
width: 15px;
height: 15px;
}
QGroupBox::indicator:unchecked {
image: url(:/image/checkbox_unchecked.png);
}
QGroupBox::indicator:unchecked:hover {
image: url(:/image/checkbox_unchecked_hover.png);
}
QGroupBox::indicator:checked {
image: url(:/image/checkbox_checked.png);
}
QGroupBox::indicator:checked:hover {
image: url(:/image/checkbox_checked_hover.png);
}免责声明:文章内容来自互联网,本站不对其真实性负责,也不承担任何法律责任,如有侵权等情况,请与本站联系删除。
转载请注明出处:QGroupBox样式 https://www.yhzz.com.cn/a/14789.html