I have a model that stores the index of an enumeration in an item. My tree view has a QStyledItemDelegate subclass that correctly allows editing using a QComboBox filled with the enum strings.

My problem is that I would like to display the enum text instead of the index when NOT editing the row.

Adding to the problem is that the model is used by multiple views so storing the data as the enum string instead of the index will require more work. And, being a programmer, I am against having to do more work than absolutely necessary

I have looked at overriding the paint() function but it looks like the data cannot be accessed or changed (all those darned const's). So, it looks like my only option is to change the data value in the model

Does anyone have any suggestions as to how I may accomplish this, or should I just suck it up and change the model to use the enum string in all the views?

Qt Commercial 4.6.2
Windows (XP SP3 / 7)