def leaveEvent(self, event): if self.isEnabled(): self.update() QAbstractButton.leaveEvent(self, event)