I am sure there is an another way, but you can override GlViewWidget mouseMoveEvent method (original code is commented out).
import pyqtgraph.opengl as gl
import pyqtgraph as pg
from pyqtgraph import QtCore
class GLViewWidgetLeftHanded(gl.GLViewWidget):
def __init__(self):
super(GLViewWidgetLeftHanded, self).__init__()
def mouseMoveEvent(self, ev):
diff = ev.pos() - self.mousePos
self.mousePos = ev.pos()
# if ev.buttons() == QtCore.Qt.LeftButton:
if ev.buttons() == QtCore.Qt.RightButton:
self.orbit(-diff.x(), diff.y())
elif ev.buttons() == QtCore.Qt.MidButton:
if (ev.modifiers() & QtCore.Qt.ControlModifier):
self.pan(diff.x(), 0, diff.y(), relative=True)
else:
self.pan(diff.x(), diff.y(), 0, relative=True)
app = pg.QtGui.QApplication([])
fig = GLViewWidgetLeftHanded()
axis = gl.GLAxisItem()
fig.addItem(axis)
fig.setWindowTitle('left v right')
fig.show()
pg.QtGui.QApplication.instance().exec_()