- 第一种方案 将复选框的字删除,整体使用图片样式来代替
QCheckBox::indicator {
width: 177px;
height: 66px;
color: rgb(0, 0, 0);
}
QCheckBox::indicator:unchecked {
image: url(:/image/enMonitoring/measure.png);
}
QCheckBox::indicator:checked {
image: url(:/image/enMonitoring/measurepress.png)
}
效果:
2.第二种方案 修改框大小和图片 字体自己刷新
QCheckBox::indicator {
width: 100px;
height: 100px;
color: rgb(0, 0, 0);
}
QCheckBox::indicator:unchecked {
image: url(:/image/checkfalse.png);
}
QCheckBox::indicator:checked {
image: url(:/image/checkture.png);
}