This shows how to use different mouse buttons and modifiers.
from PySide6.QtCore import *
from PySide6.QtGui import *
from PySide6.QtWidgets import *
class W(QLabel):
def mousePressEvent(self,e):
print(e)
mods = e.modifiers().value
button = e.button()
print("left", button == Qt.LeftButton)
print("right", button == Qt.RightButton)
shift = Qt.ShiftModifier.value
print("shift", shift&mods != 0)
app = QApplication([])
w = W("hello")
w.show()
app.exec()