不知你的qt是什么版本?
在qt4.2以上的版本中,如下可以设置一个QComboBox 的Completer的:
void QComboBox::setCompleter ( QCompleter * completer )
Sets the completer to use instead of the current completer. If completer is 0, auto completion is disabled.
By default, for an editable combo box, a QCompleter that performs case insensitive inline completion is automatically created.
This function was introduced in Qt 4.2.
See also completer().
还有关于 stdjgwyc 提到的 customcompleter 我在个人作品展示区的一个简单的多文档编辑器里也有简单的实现,愿意看的话也可以小小参考一下下!