bug: PyQt6 does not have localPos()
this bug must have existed since the removal of the mouse shims from Qt.py.
This commit is contained in:
parent
f9f5d46589
commit
e76328ab0e
|
@ -434,10 +434,11 @@ class GLViewWidget(QtWidgets.QOpenGLWidget):
|
|||
return xDist / self.width()
|
||||
|
||||
def mousePressEvent(self, ev):
|
||||
self.mousePos = ev.localPos()
|
||||
lpos = ev.position() if hasattr(ev, 'position') else ev.localPos()
|
||||
self.mousePos = lpos
|
||||
|
||||
def mouseMoveEvent(self, ev):
|
||||
lpos = ev.localPos()
|
||||
lpos = ev.position() if hasattr(ev, 'position') else ev.localPos()
|
||||
diff = lpos - self.mousePos
|
||||
self.mousePos = lpos
|
||||
|
||||
|
|
Loading…
Reference in New Issue