src/eric7/WebBrowser/SafeBrowsing/SafeBrowsingLabel.py

branch
eric7
changeset 10436
f6881d10e995
parent 9653
e67609152c5e
child 10439
21c28b0f9e41
equal deleted inserted replaced
10435:c712d09cc839 10436:f6881d10e995
24 24
25 def __init__(self, parent=None): 25 def __init__(self, parent=None):
26 """ 26 """
27 Constructor 27 Constructor
28 28
29 @param parent reference to the parent widget (QWidget) 29 @param parent reference to the parent widget
30 @type QWidget
30 """ 31 """
31 super().__init__(parent) 32 super().__init__(parent)
32 33
33 self.setFocusPolicy(Qt.FocusPolicy.NoFocus) 34 self.setFocusPolicy(Qt.FocusPolicy.NoFocus)
34 self.setCursor(Qt.CursorShape.PointingHandCursor) 35 self.setCursor(Qt.CursorShape.PointingHandCursor)
43 44
44 def mouseReleaseEvent(self, evt): 45 def mouseReleaseEvent(self, evt):
45 """ 46 """
46 Protected method to handle mouse release events. 47 Protected method to handle mouse release events.
47 48
48 @param evt reference to the mouse event (QMouseEvent) 49 @param evt reference to the mouse event
50 @type QMouseEvent
49 """ 51 """
50 if evt.button() == Qt.MouseButton.LeftButton: 52 if evt.button() == Qt.MouseButton.LeftButton:
51 self.clicked.emit(evt.globalPosition().toPoint()) 53 self.clicked.emit(evt.globalPosition().toPoint())
52 else: 54 else:
53 super().mouseReleaseEvent(evt) 55 super().mouseReleaseEvent(evt)
54 56
55 def mouseDoubleClickEvent(self, evt): 57 def mouseDoubleClickEvent(self, evt):
56 """ 58 """
57 Protected method to handle mouse double click events. 59 Protected method to handle mouse double click events.
58 60
59 @param evt reference to the mouse event (QMouseEvent) 61 @param evt reference to the mouse event
62 @type QMouseEvent
60 """ 63 """
61 if evt.button() == Qt.MouseButton.LeftButton: 64 if evt.button() == Qt.MouseButton.LeftButton:
62 self.clicked.emit(evt.globalPosition().toPoint()) 65 self.clicked.emit(evt.globalPosition().toPoint())
63 else: 66 else:
64 super().mouseDoubleClickEvent(evt) 67 super().mouseDoubleClickEvent(evt)

eric ide

mercurial