PyQt supports autocomplete. If you type in a text box (
QLineEdit), it can make suggestions. Those suggestions are recommended from a list.
This example adds auto complete to a
QLineEdit text box.
image: tabs showing in a pyqt window.
Start by creating a list of options (names) and creates a
completer = QCompleter(names).
A line edit is created with the line
self.lineedit = QLineEdit(). The line edit otherwise works as normal.
The suggestions are added with
If you forget the last line, the
QLineEdit are not connected, meaning there is no auto completion.
from PyQt5.QtWidgets import *