MCPcopy Create free account
hub / github.com/PyQt5/PyQt / paintEvent

Method paintEvent

Demo/Notification.py:148–154  ·  view source on GitHub ↗
(self, event)

Source from the content-addressed store, hash-verified

146 self.callback() # 回调
147
148 def paintEvent(self, event):
149 # 圆角以及背景色
150 super(NotificationItem, self).paintEvent(event)
151 painter = QPainter(self)
152 path = QPainterPath()
153 path.addRoundedRect(QRectF(self.rect()), 6, 6)
154 painter.fillPath(path, Qt.white)
155
156
157class NotificationWindow(QListWidget):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected