当前位置: 首页 > 工具软件 > QRadioButton > 使用案例 >

QT样式表 ---QradioButton的一些样式

徐景明
2023-12-01
background-color:rgb(192, 192, 192);
border:1px solid black; 
font:10pt; 

QRadioButton
{
	color:black;
	border: none;
	background-color:rgb(192, 192, 192);
	border:1px solid black; 
	font:10pt;
}

QRadioButton:disabled
{	
	color: gray;
}

QRadioButton::indicator 
{
    width: 12px;
    height: 12px;
    border-radius: 8px;
}
 
QRadioButton::indicator:checked 
{
	width: 14px;
    height: 14px;
    background-color: qradialgradient(spread:pad, cx:0.5, cy:0.5, radius:0.5, fx:0.5, fy:0.5, stop:0 rgba(4, 156, 232 ,255), stop:0.6 rgba(4, 156, 232 ,255),stop:0.65 rgba(255, 255, 255, 255), stop:0.8 rgba(255, 255, 255, 255), stop:0.85 rgba(4, 156, 232, 255), stop:1 rgba(4, 156, 232 ,255));
    border: 1px solid rgb(4, 156, 232);
	border-radius: 8px;
}
 
QRadioButton::indicator:unchecked 
{
    background-color: white;
    border: 2px solid rgb(66, 66, 66);
}

QRadioButton::indicator:unchecked:disabled
{
    background-color: rgb(213, 213, 213);
    border: 2px solid  rgb(200, 200, 200);
}

QRadioButton::indicator:checked:disabled 
{
	width: 14px;
    height: 14px;
	background-color: qradialgradient(spread:pad, cx:0.5, cy:0.5, radius:0.5, fx:0.5, fy:0.5, stop:0 gray, stop:0.6 gray,stop:0.65 white, stop:0.8 white, stop:0.85 gray, stop:1 gray);
    border: 1px solid gray;
	border-radius: 8px;
}

 类似资料: