eric6/E5Gui/E5ClickableLabel.py

changeset 7252
c5e3705073eb
parent 7229
53054eb5b15a
child 7360
9190402e4505
equal deleted inserted replaced
7251:bc5b1b00560a 7252:c5e3705073eb
43 if evt.button() == Qt.LeftButton and self.rect().contains(evt.pos()): 43 if evt.button() == Qt.LeftButton and self.rect().contains(evt.pos()):
44 if evt.modifiers() == Qt.ControlModifier: 44 if evt.modifiers() == Qt.ControlModifier:
45 self.middleClicked.emit(evt.globalPos()) 45 self.middleClicked.emit(evt.globalPos())
46 else: 46 else:
47 self.clicked.emit(evt.globalPos()) 47 self.clicked.emit(evt.globalPos())
48 elif evt.button() == Qt.MidButton and \ 48 elif (
49 self.rect().contains(evt.pos()): 49 evt.button() == Qt.MidButton and
50 self.rect().contains(evt.pos())
51 ):
50 self.middleClicked.emit(evt.globalPos()) 52 self.middleClicked.emit(evt.globalPos())
51 else: 53 else:
52 super(E5ClickableLabel, self).mouseReleaseEvent(evt) 54 super(E5ClickableLabel, self).mouseReleaseEvent(evt)

eric ide

mercurial