def add_completer(widget, items):
 completer = QtWidgets.QCompleter(items, widget)
 completer.setCaseSensitivity(Qt.CaseInsensitive)
 completer.setCompletionMode(QtWidgets.QCompleter.InlineCompletion)
 widget.setCompleter(completer)

def add_completer ( widget , items ) : completer = QtWidgets . QCompleter ( items , widget ) completer . setCaseSensitivity ( Qt . CaseInsensitive ) completer . setCompletionMode ( QtWidgets . QCompleter . InlineCompletion ) widget . setCompleter ( completer )
add simple completion to a widget .