qss设置边框阴影

时间:2021-09-14 01:01:16


以QLabel为列:
设置Qss如下

QLabel{
border-top: 5px solid qlineargradient(y0:0, y1:1,stop: 0 #ececef, stop: 1 white);
border-left: 5px solid qlineargradient(x0:0, x1:1,stop: 0 #ececef, stop: 1 white);
border-bottom: 5px solid qlineargradient(y0:0, y1:1,stop: 0 white, stop: 1 #ececef);
border-right: 5px solid qlineargradient(x0:0, x1:1,stop: 0 white, stop: 1 #ececef);
background-color: rgb(255,255,255);
}

效果:

qss设置边框阴影