I’ve got a QTableView for which I want to display the last column always in edit mode. (It’s a QComboBox where the user should be able to always change the value.)
I think I’ve seen the solution in the Qt documentation, but I can’t find it anymore. Is there a simple way of doing it?
I think I could archive this effect by using openPersistentEditor() for every cell, but I’m looking for a better way. (Like specifying it only one time for the whole column.)
There are two possibilities:
Using
setIndexWidget, but Trolltech writes:(And it breaks the Model/View pattern…)
Or using a delegate’s
paintmethod. But here you have to implement everything like enabled/disabled elements yourself.