(self, *args, **kwargs)
| 22 | class Window(QWidget): |
| 23 | |
| 24 | def __init__(self, *args, **kwargs): |
| 25 | super(Window, self).__init__(*args, **kwargs) |
| 26 | self.resize(400, 400) |
| 27 | layout = QVBoxLayout(self) |
| 28 | layout.addWidget(QPushButton('退出', self, clicked=self.doClose)) |
| 29 | |
| 30 | # 窗口透明度动画类 |
| 31 | self.animation = QPropertyAnimation(self, b'windowOpacity') |
| 32 | self.animation.setDuration(1000) # 持续时间1秒 |
| 33 | |
| 34 | # 执行淡入 |
| 35 | self.doShow() |
| 36 | |
| 37 | def doShow(self): |
| 38 | try: |
nothing calls this directly
no test coverage detected