Originally Posted by
Bebras
These "strategies" you were talking about ? Can you give me an example? Now I just set the button's text to the same text as text in data array.
I mean, in general, that it's not always necessary to keep an entire column in the internal data structure of the model for these button texts. Imagine a table model for stock prices, where the internal data structure has some informations that you can use to deduce if the button text must be "Sell" or "Buy".
Something like this ...
The choice of the text can also be delegated to the renderer/editor. The table model could return an int or enum value and the renderer/editor can select the appropriate text. These are design choices, that doesn't change the final result.
The important thing is that there must be an implicit "relation" between the renderer/editor and the value of the relative column in the model.