Qt 4.5 (PyQt 4.6.1)
I'm looking for a widget similar to a QComboBox
that automatically filters its entries to the ones starting with the input in the text field. There are around 300 items in the combo box.
I've tried two approaches:
QLineEdit
with QCompleter
Advantages
- Filtering the items works.
Disadvantages
- Doesn't show a popup if the text field is empty.
- Doesn't do inline completion.
- Allows to insert items not in the list.
Editable QComboBox
with insertion set to no
Advantages
- Nice popup
- Completes inline in the text field.
Disadvantages
- No filtering
- Input is only possible in either the text field or the popup. Clicking on the popup doesn't select the best-matching item in the popup.
What I need
- A popup to select the items.
- Slow tippers should be able to start tipping the name of an item and the popup switches to the best matching one.
- Preferably I should filter the items so that only partially-matching items are shown.