鼠标移动事件
(self, event)
| 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 | # 绘制默认的样式 |
nothing calls this directly
no test coverage detected