Hi, i was doing a little game and when using a QGraphicsRectItem with the mousePressEvent i tried to capture the event where the player clicks both left and right click, i&#39;ve tried the following without luck:<br><br>def mousePressEvent(self, event):
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print event.button()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # prints 1<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print QtCore.Qt.RightButton # prints 2<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print QtCore.Qt.LeftButton&nbsp;&nbsp; # prints 1<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print event.buttons().__int__() # always the same as button()
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print event.buttons().__int__() &amp; QtCore.Qt.RightButton &amp; QtCore.Qt.LeftButton # Always false, no wonder seeing the line before :P<br><br><br>Best Regards<br>Hernan Rajchert<br>