pyqt5 qmainwindow mouse move event adding 0 0 code example
Example: pyqt5 qmainwindow mouse move event
def eventFilter(self, source, event):
if event.type() == QtCore.QEvent.MouseMove:
if event.buttons() == QtCore.Qt.NoButton:
print("Simple mouse motion")
elif event.buttons() == QtCore.Qt.LeftButton:
print("Left click drag")
elif event.buttons() == QtCore.Qt.RightButton:
print("Right click drag")
elif event.type() == QtCore.QEvent.MouseButtonPress:
if event.button() == QtCore.Qt.LeftButton:
print("Press!")
return super(Window, self).eventFilter(source, event)