MCPcopy
hub / github.com/PyQt5/PyQt / __init__

Method __init__

QPropertyAnimation/FadeInOut.py:24–35  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

22class 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:

Callers

nothing calls this directly

Calls 4

resizeMethod · 0.95
doShowMethod · 0.95
addWidgetMethod · 0.80
setDurationMethod · 0.80

Tested by

no test coverage detected