MCPcopy Create free account
hub / github.com/PyQt5/PyQtClient / __init__

Method __init__

Widgets/Dialogs/DonateDialog.py:24–44  ·  view source on GitHub ↗
(self, alipayImg, wechatImg, *args, **kwargs)

Source from the content-addressed store, hash-verified

22class DonateDialog(MoveDialog, Ui_FormDonateDialog):
23
24 def __init__(self, alipayImg, wechatImg, *args, **kwargs):
25 super(DonateDialog, self).__init__(*args, **kwargs)
26 self.setupUi(self)
27 # 关闭后自动销毁
28 self.setAttribute(Qt.WA_DeleteOnClose, True)
29 # 背景透明
30 self.setAttribute(Qt.WA_TranslucentBackground, True)
31 # 无边框
32 self.setWindowFlags(self.windowFlags() | Qt.FramelessWindowHint)
33 # 加载鼠标样式
34 ThemeManager.loadCursor(self)
35 # 加载鼠标样式
36 ThemeManager.loadCursor(self.labelAlipayImg)
37 ThemeManager.loadCursor(self.labelWechatImg, ThemeManager.CursorPointer)
38 # 加载图片
39 self.labelAlipayImg.setPixmap(
40 QPixmap(alipayImg).scaled(300, 300, Qt.IgnoreAspectRatio,
41 Qt.SmoothTransformation))
42 self.labelWechatImg.setPixmap(
43 QPixmap(wechatImg).scaled(300, 300, Qt.IgnoreAspectRatio,
44 Qt.SmoothTransformation))

Callers

nothing calls this directly

Calls 3

loadCursorMethod · 0.80
setupUiMethod · 0.45
setPixmapMethod · 0.45

Tested by

no test coverage detected