QGroupBox推荐样式

样式代码一:

QGroupBox
{
	border: 3px solid gray;
	border-radius:10px;
	margin-top:4ex;
	font-family:楷体;
	font:bold 18px;
 
} 
QGroupBox::title
{
	subcontrol-origin:margin;
	subcontrol-position:top center;
	padding:1px;
}
QGroupBox::enabled{
	border: 3px solid gray;
}
QGroupBox::!enabled {
	border: 1px solid gray;
}

显示效果:
QGroupBox推荐样式_第1张图片

样式代码二:

QGroupBox
{
	border: 0px solid gray;
	border-radius:10px;
	margin-top:0ex;
	font-family:楷体;
	font:bold 20px;
	background-color: rgb(255, 255, 255);
}

QGroupBox::enabled{
	border: 0px solid gray;
}

QGroupBox::!enabled {
	border: 1px solid gray;
	background-color: rgb(220, 220, 220);
}
QGroupBox::title
{
	subcontrol-origin:margin;
	subcontrol-position:top center;
	padding:1px;
}

显示效果:QGroupBox推荐样式_第2张图片
上图中qtabwidget样式可参考:https://blog.csdn.net/weixin_42887343/article/details/117554600

你可能感兴趣的:(C++\QT,qgroupbox,qt,样式)