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

Method mouseMoveEvent

QSplitter/RewriteHandle.py:40–51  ·  view source on GitHub ↗

鼠标移动事件

(self, event)

Source from the content-addressed store, hash-verified

38 self.clicked.emit()
39
40 def mouseMoveEvent(self, event):
41 """鼠标移动事件"""
42 # 当y坐标小于24时,也就是顶部的矩形框高度
43 if event.pos().y() <= 24:
44 # 取消鼠标样式
45 self.unsetCursor()
46 event.accept()
47 else:
48 # 设置默认的鼠标样式并可以移动
49 self.setCursor(Qt.SplitHCursor if self.orientation()
50 == Qt.Horizontal else Qt.SplitVCursor)
51 super(SplitterHandle, self).mouseMoveEvent(event)
52
53 def paintEvent(self, event):
54 # 绘制默认的样式

Callers

nothing calls this directly

Calls 2

yMethod · 0.80
orientationMethod · 0.80

Tested by

no test coverage detected