我想让标签的“背景”透明,所以我可以放一个模糊的边框,但我不知道如何让它消失。
标签代码如下:
self.lb = QLabel(self)
self.lb.setWindowFlags(Qt.ToolTip)
rand_img = self.my_images[randint(0, len(self.my_images)-1)]
print(rand_img + " loaded")
self.lb.setStyleSheet("background-image: url(images/"+rand_img+");\
background-repeat: no-repeat;\
background-origin:padding-box;\
color:white;\
border-style: ridge;\
border-width: 20px;\
border-color: rgb(0,0,0,50%);\
border-radius: 25px;\
font: 16px;\
font-weight: bold;\
font-family: 'Consolas';\
min-width: 10em;\
padding: 10px;")
self.lb.setText('> Ready!\n> Paused...')
self.lb.show()