Reputation: 2760
I have a QTableWidget has a QTableWidgetItem that contains a code a user will supply. This code is known to the database and is suppose to autosuggest to the user as he types. How do I connect a QCompleter to a QTableWidgetItem. I know how to do it with a QLineEdit, but I have not found an example with a QTableWidgetItem.
Upvotes: 3
Views: 1261
Reputation: 2760
I managed to come up with a solution, though not exactly by using a QTableWidgetItem, basically I placed a QLineEdit in the cell instead and attached the QCompleter to that.
Upvotes: 2
Reputation: 15175
Not sure how far this will get you, but take a look at this
http://docs.huihoo.com/qt/4.4/demos-spreadsheet-main-cpp.html
Search for completer
in the code.
Upvotes: 1