The previous question was this.
EDITED TO PROVIDE INFO:
The model represents a dict of dicts, which they can inherit other dicts apart from key-value pairs:
dict_of_dicts={
'dict1':{'k1':'v1', 'k2':'v2', 'k3':'v3', 'EXISTING_DICT':'dict2'},
'dict2':{'k4':'v4'},
'dict3':{'k5':'v5', 'k6':'v6'},
}
being the qlistview:
*dict1
------
dict2
-----
dict3
and the qtableview with dict1 selected in the qlistview:
k1 | v1
-------
k2 | v2
-------
k3 | v3
-------
dict2
Is there a way to sort the model with first the inherited dicts on top, and then the dict elements?
dict2
-------
k1 | v1
-------
k2 | v2
-------
k3 | v3
And if we introduce new elements in the fly (I have way to introduce new elements in the interface), it get sorted no matter the order?
I was playing with QStandardItemModel sort and setSortRole(Qt.CheckStateRole)