Exemplo n.º 1
0
    def focusOutEvent(self, event):
        """Handle focus out event restoring the last valid selected path."""
        # Calling asynchronously the 'add_current_text' to avoid crash
        # https://groups.google.com/group/spyderlib/browse_thread/thread/2257abf530e210bd
        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)
Exemplo n.º 2
0
 def focusOutEvent(self, event):
     """Handle focus out event"""
     # Calling asynchronously the 'add_current_text' to avoid crash
     # https://groups.google.com/group/spyderlib/browse_thread/thread/2257abf530e210bd
     QTimer.singleShot(50, self.add_current_text_if_valid)
     QComboBox.focusOutEvent(self, event)
Exemplo n.º 3
0
 def focusOutEvent(self, event):
     """Handle focus out event"""
     # Calling asynchronously the 'add_current_text' to avoid crash
     # https://groups.google.com/group/spyderlib/browse_thread/thread/2257abf530e210bd
     QTimer.singleShot(50, self.add_current_text_if_valid)
     QComboBox.focusOutEvent(self, event)