gpt4 book ai didi

qt - qt中的自动完成文本框?

转载 作者:行者123 更新时间:2023-12-04 13:04:20 24 4
gpt4 key购买 nike

我是 QT 的新手,如何在 qt 中实现自动完成文本框,或者是否已经有解决方案?我有词向量。有人可以给我建议如何做到这一点吗?

最佳答案

看看QCompleter .

The QCompleter class provides completions based on an item model.

You can use QCompleter to provide auto completions in any Qt widget,such as QLineEdit and QComboBox. When the user starts typing a word,QCompleter suggests possible ways of completing the word, based on aword list. The word list is provided as a QAbstractItemModel. (Forsimple applications, where the word list is static, you can pass aQStringList to QCompleter's constructor.)

关于qt - qt中的自动完成文本框?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7042430/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com