谢邀。
方法一:贴图
// 基础属性
QPushButton {
border-width: 0px;
background-image: url(:/circleButton.png) }
// 鼠标指向效果
QPushButton::hovered {
border-width: 0px;
background-image: url(:/circleButton_hovered.png) }
// 按下效果
QPushButton::pressed {
border-width: 0px;
background-image: url(:/circleButton_pressed.png) }
// 默认按钮及tab焦点
QPushButton ::default{
border-width: 0px;
background-image: url(:/circleButton_default.png) }
方法二:用渐变。在designer里,编辑样式表,然后添加渐变,里面有圆形的范例。把背景设为圆形渐变图就是了,边框同样可以用渐变表示,比如stop:0.99, rgb(渐变色), stop:1.0, rgb(255, 255, 255),就有一圈黑色边框了