|
|
@ -329,12 +329,16 @@ class ToggleSwitch(QtWidgets.QAbstractButton): |
|
|
|
|
|
|
|
def mouseReleaseEvent(self, event): # pylint: disable=invalid-name |
|
|
|
super().mouseReleaseEvent(event) |
|
|
|
|
|
|
|
""" |
|
|
|
broken since Qt5.15 |
|
|
|
if event.button() == QtCore.Qt.LeftButton: |
|
|
|
anim = QtCore.QPropertyAnimation(self, b'offset', self) |
|
|
|
anim.setDuration(120) |
|
|
|
anim.setStartValue(self.offset) |
|
|
|
anim.setEndValue(self._end_offset[self.isChecked()]()) |
|
|
|
anim.start() |
|
|
|
""" |
|
|
|
|
|
|
|
def enterEvent(self, event): # pylint: disable=invalid-name |
|
|
|
self.setCursor(QtCore.Qt.PointingHandCursor) |
|
|
|