📜  qt 自动完成 - 任何代码示例

📅  最后修改于: 2022-03-11 14:57:13.584000             🧑  作者: Mango

代码示例1
def autoComplete(line, list):
    completer = QCompleter()
    line.setCompleter(completer)

    model = QStringListModel()
    model.setStringList(list)
    completer.setModel(model)
    line.show()

autoComplete(linedit, list)