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

Method paintEvent

Demo/NewFramelessWindow.py:181–184  ·  view source on GitHub ↗
(self, event)

Source from the content-addressed store, hash-verified

179 self.layout().setContentsMargins(m, m, m, m)
180
181 def paintEvent(self, event):
182 # 透明背景但是需要留下一个透明度用于鼠标捕获
183 painter = QPainter(self)
184 painter.fillRect(self.rect(), QColor(255, 255, 255, 1))
185
186
187if __name__ == '__main__':

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected