def headerData(self, section, orientation, role=Qt.DisplayRole):
'''The data for the given role and section in the header with
the specified orientation.
Args:
section (:obj:`int`):
orientation (:obj:`Qt.Orientation`):
role (:obj:`Qt.DisplayRole`):
Returns:
data
'''
if role != Qt.DisplayRole:
return None
if (orientation == Qt.Horizontal) and (section < len(self.header)):
return self.header[section]
return None
评论列表
文章目录