def __init__(self, parent=None, completer_widget=None, sort_func=sort_key, strip_completion_entries=True): QLineEdit.__init__(self, parent) self.setClearButtonEnabled(True) self.sep = ',' self.space_before_sep = False self.add_separator = True self.original_cursor_pos = None completer_widget = (self if completer_widget is None else completer_widget) self.mcompleter = Completer( completer_widget, sort_func=sort_func, strip_completion_entries=strip_completion_entries) self.mcompleter.item_selected.connect( self.completion_selected, type=Qt.ConnectionType.QueuedConnection) self.mcompleter.relayout_needed.connect(self.relayout) self.mcompleter.setFocusProxy(completer_widget) self.textEdited.connect(self.text_edited) self.no_popup = False
def __init__(self, parent): QLineEdit.__init__(self, parent) self.mi = None self.setClearButtonEnabled(True)
def __init__(self, name, layout): QLineEdit.__init__(self) self.setClearButtonEnabled(True) opt = options[name] self.textChanged.connect(self.changed_signal.emit) init_opt(self, opt, layout)