[Interest] QAbstractTableModel: ItemDelegate for both display and edit role
Christian Gagneraud
chgans at gna.org
Fri Jun 6 04:38:29 CEST 2014
Hi all,
I would like to use item delegates to both display and edit items using
QAbstractTableModel/QTableView.
I was able to get my specialised widget used when the user *edit* the
field but I would like to have the same widget used for displaying the
field as well.
My QStyledItemDelegate based delegated reimplements these functions:
- createEditor
- setEditorData
- setModelData
- updateEditorGeometry
I would like to know if the only way to have my widget used for both the
display role and the edit role is to reimplement as well paint() and
sizeHint(). If not, can anyone point me at docs or example?
Thanks,
Chris
More information about the Interest
mailing list