You can create a single delegate for all types of editors. Just return a different widget depending on index.column() value.
The default updateEditorGeometry() should be fine. As for the other two methods you should reimplement them. Again, depending on the column number cast the editor to a proper class, fetch the value and update the model (or vice versa).I would need to provide setEditorData method and setModelData and updateEditorGeometry methods?
QAbstractItemView::setItemDelegate(), QAbstractItemView::setItemDelegateForColumn(), QAbstractItemView::setItemDelegateForRow()How do I set the above delegate for say the first column of the table view?
Bookmarks