Try this code, this is what I used in my project
import sys from PyQt4.QtGui import QComboBox, QApplication, QCompleter, QSortFilterProxyModel, QStandardItemModel, QStandardItem from PyQt4.QtCore import Qt class ExtendedCombo( QComboBox ): def __init__( self, parent = None): super( ExtendedCombo, self ).__init__( parent ) self.setFocusPolicy( Qt.StrongFocus ) self.setEditable( True ) self.completer = QCompleter( self )
source share