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

Method mousePressEvent

Demo/Lib/FramelessWindow.py:225–230  ·  view source on GitHub ↗

鼠标点击事件

(self, event)

Source from the content-addressed store, hash-verified

223 painter.drawRect(self.rect())
224
225 def mousePressEvent(self, event):
226 """鼠标点击事件"""
227 super(FramelessWindow, self).mousePressEvent(event)
228 if event.button() == Qt.LeftButton:
229 self._mpos = event.pos()
230 self._pressed = True
231
232 def mouseReleaseEvent(self, event):
233 '''鼠标弹起事件'''

Callers

nothing calls this directly

Calls 1

mousePressEventMethod · 0.45

Tested by

no test coverage detected