给出数据结构:
@dataclass
class NC:
PN : string # group all NC instance with this attribute
C1 : string
C2 : string
C3 : string
L1 = NC('80767','a','b','c')
L2 = NC('80767','aa','bb','cc')
L3 = NC('80198', 'az', 'bz','cz')
预期产量
80767
-a|b|c
-aa|bb|cc
80196
-az[bz|cz
如何简单地在QtreeWideget中渲染它?
tree = QTreeView()
tree.setModel(model)