def paintEvent(self, event: QPaintEvent):
# 圆角
bmp = QBitmap(self.size())
bmp.fill()
painter = QPainter(bmp)
painter.setRenderHint(QPainter.Antialiasing)
painter.setPen(Qt.NoPen)
painter.setBrush(Qt.black)
painter.drawRoundedRect(bmp.rect(), 6, 6)
self.setMask(bmp)