I am new to QT, how to implement autocomplete textbox in qt or is there already solution for that ? I have vector of words. Can somebody give me advice how to do this ?
Take a look at 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 a word list. The word list is provided as a QAbstractItemModel. (For simple applications, where the word list is static, you can pass a QStringList to QCompleter's constructor.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With