QRadioButton{
spacing: 2px;
color: white;
}
QRadioButton::indicator {
width: 45px;
height: 30px;
}
QRadioButton::indicator:unchecked {
image: url(:/Images/switchOff);
}
QRadioButton::indicator:unchecked:hover {
image: url(:/Images/switchOffHover);
}
QRadioButton::indicator:unchecked:pressed {
image: url(:/Images/switchOffPressed);
}
QRadioButton::indicator:checked {
image: url(:/Images/switchOn);
}
QRadioButton::indicator:checked:hover {
image: url(:/Images/switchOnHover);
}
QRadioButton::indicator:checked:pressed {
image: url(:/Images/switchOnPressed);
}
参考:
https://www.yuque.com/docs/share/9443c305-747c-44f9-bb13-8fa03f0df13d