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

Method __init__

Demo/FramelessDialog.py:46–58  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

44class 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)

Callers

nothing calls this directly

Calls 2

initUiMethod · 0.95
setColorMethod · 0.80

Tested by

no test coverage detected