26 |
26 |
27 def __init__(self, parent=None): |
27 def __init__(self, parent=None): |
28 """ |
28 """ |
29 Constructor |
29 Constructor |
30 |
30 |
31 @param parent reference to the parent widget (QWidget) |
31 @param parent reference to the parent widget |
|
32 @type QWidget |
32 """ |
33 """ |
33 super().__init__(parent) |
34 super().__init__(parent) |
34 |
35 |
35 self.setCursor(Qt.CursorShape.PointingHandCursor) |
36 self.setCursor(Qt.CursorShape.PointingHandCursor) |
36 |
37 |
37 def mouseReleaseEvent(self, evt): |
38 def mouseReleaseEvent(self, evt): |
38 """ |
39 """ |
39 Protected method handling mouse release events. |
40 Protected method handling mouse release events. |
40 |
41 |
41 @param evt mouse event (QMouseEvent) |
42 @param evt mouse event |
|
43 @type QMouseEvent |
42 """ |
44 """ |
43 if evt.button() == Qt.MouseButton.LeftButton and self.rect().contains( |
45 if evt.button() == Qt.MouseButton.LeftButton and self.rect().contains( |
44 evt.position().toPoint() |
46 evt.position().toPoint() |
45 ): |
47 ): |
46 if evt.modifiers() == Qt.KeyboardModifier.ControlModifier: |
48 if evt.modifiers() == Qt.KeyboardModifier.ControlModifier: |