I have made a couple of projects in PyQt now, and I am becoming more familiar with the model/view school of thought that Qt adopts. I have used this for things like list and table views with a custom model behind them to display and manipulate data. I have used delegates to edit the underlying information in each cell/row.
How do I abstract this model/view architecture in Qt to removed the need for the table/list? Cut straight to the editing delegate.
Saying it visually, can do this:
Where an edit trigger on a row opens up a delegate like so
I would like to move to something that looks more like this
where the objects corresponding to thing1, thing2 and another thing are not a static and could be shared between multiple views. Much like using an QAbstractModel with a QTableView.
You could use
QtGui.QDataWidgetMapper
. See how this example works: