'Handle focus out event restoring the last valid selected path.'

def focusOutEvent(self, event):

    if (not self.is_valid()):
        lineedit = self.lineEdit()
        QTimer.singleShot(50, (lambda : lineedit.setText(self.selected_text)))
    hide_status = getattr(self.lineEdit(), 'hide_status_icon', None)
    if hide_status:
        hide_status()
    QComboBox.focusOutEvent(self, event)
