def headerData(self, section, orientation, role=Qt.DisplayRole):
if role == Qt.DisplayRole and orientation == Qt.Horizontal:
if section >= len(self._headerLabels):
return None
else:
return self._headerLabels[section]
return super(AbstractListModel, self).headerData(section, orientation, role)
评论列表
文章目录