def focusInEvent(self, event): """Override Qt method.""" QWidget.focusInEvent(self, event) self.setProperty('focused', True)