提交 a9c4df0a 编写于 作者: K Kentaro Wada

Use MouseEvent.localPos which returns QtPointF (pos is QPoint)

上级 d8e8a5c0
......@@ -280,7 +280,7 @@ class Canvas(QtWidgets.QWidget):
def mousePressEvent(self, ev):
if QT5:
pos = self.transformPos(ev.pos())
pos = self.transformPos(ev.localPos())
else:
pos = self.transformPos(ev.posF())
if ev.button() == QtCore.Qt.LeftButton:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册