The previous question was PySide2 QListView QTableView sync problem
Imagine to have another dict4 in the data structure:
'dict4':{'k8':'v8', 'EXISTING_DICT':'dict2'},
Meaning, that a dictionary could include another existing dictionary.
So the representation in the QTableView shouldn't be directly showed, but:
1) Show just the name of it in the QTableView:
k1 | v1
-------
k2 | v2
-------
k3 | v3
-------
dict2
2) If double click it on it: select the existing dictionary in the QListView, which will trigger to show its contents in the QTableView, which in this case:
k4 | v4
In this case the idea is to use a role to indicate that the field points to another item, then use setSpan to join items and finally check if the item selected in the QTableView points to another element by selecting if it is so
UPDATE:
UPDATE2