You can achieve it with QTreeView. The view is just for displaying data and you want to change the data itself - the model. Editing model data is a responsibility of item delegate - it calls setData() on the model where appropriate, just make sure your model can handle setData() calls. If you take a look at QItemDelegate - there are createEditor, setEditorData and setModelData methods. They are responsible for edition. You can reimplement them if the default implementations don't suit your needs (but maybe they do, check that out). Just make sure data in your model is editable (return ItemIsEditable if flags() for each index you want editable) and set proper triggers in the view using QAbstractItemView::setEditTriggers().
Bookmarks