| 44 | class Dialog(QDialog): |
| 45 | |
| 46 | def __init__(self, *args, **kwargs): |
| 47 | super(Dialog, self).__init__(*args, **kwargs) |
| 48 | self.setObjectName('Custom_Dialog') |
| 49 | self.setWindowFlags(self.windowFlags() | Qt.FramelessWindowHint) |
| 50 | self.setAttribute(Qt.WA_TranslucentBackground, True) |
| 51 | self.setStyleSheet(Stylesheet) |
| 52 | self.initUi() |
| 53 | # 添加阴影 |
| 54 | effect = QGraphicsDropShadowEffect(self) |
| 55 | effect.setBlurRadius(12) |
| 56 | effect.setOffset(0, 0) |
| 57 | effect.setColor(Qt.gray) |
| 58 | self.setGraphicsEffect(effect) |
| 59 | |
| 60 | def initUi(self): |
| 61 | layout = QVBoxLayout(self) |