QTableWidget 如何基于一列排序的基础上对另一列进行排序?
你可以派生QSortFilterProxyModel
来实现你需要的排序算法,派生QAbstractTableModel
实现你自己的Model,把proxy model和你自己的model串联起来,然后用QTableView
显示。
详情请参考Qt Model View Programming
https://doc.qt.io/qt-6/model-view-programming.html#:~:text=MVC%20consists%20of%20three%20kinds,to%20increase%20flexibility%20and%20reuse.