def mousePressEvent self event if event button Qt RightButton print ev

1
2
3
4
5
6
def mousePressEvent(self, event):
if event.button() == Qt.RightButton:
print '1'
event.accept()
else:
return QWebView.mousePressEvent(self, event)