Hello,
Ok, I know how to create my own editors for QTableWidget, so I used QTextEdit and I created for each cell one editor (openPersistentEditor).
What design solution would you advice to maintain those:
a) each editor updates model data on each change -- I don't like it, it means, if user types a letter, with each letter I have to update data; advantage of this is I can pretend there is no editors when retrieving text from QTableWidget
b) make no updates, all data are kept in editors -- maybe it does not look elegant but it is efficient since there is no need for updates viewer<->model
The problem with (b) is I don't know if there is already some method in Qt to get the editor for given cell. I know it is created but how to get editor for cell (5,3)?
I could store all pointers to editors by myself but it is better not to reinvent the wheel so I am asking --
how to retrieve the editor associated with given cell in QTableWidget?
Comments on (a) vs. (b) are welcomed.
have a nice day, bye
Bookmarks