MCPcopy Create free account
hub / github.com/PyQt5/PyQt / restoreSort

Method restoreSort

QListView/SortItemByRole.py:95–98  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

93 self._initItems()
94
95 def restoreSort(self):
96 # 恢复默认排序
97 self.fmodel.setSortRole(IdRole) # 必须设置排序角色为ID
98 self.fmodel.sort(0) # 排序第一列按照ID升序
99
100 def sortByClassify(self):
101 self.fmodel.setSortIndex(NameDict.get(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected