I’m currently connecting this signal with a function that handles the click. For example:
QtCore.QObject.connect(self.ui.webView, QtCore.SIGNAL("linkClicked (const QUrl&)"), self.navigate)
def navigate(self, url):
#do something
What I’d like to is for the for the navigate function to know if the link was clicked on by the left or right mouse button. Something like
def navigate(self, url, event):
if event == Qt.LeftClick:
#do something
if event == Qt.MidClick:
#do something else
Is this possible?
Another method is reimplementing the
mousePressEventand filtering mouse events there: