def headerData(self, section, orientation, role=None):
if role == Qt.DisplayRole:
return QVariant()
if orientation == Qt.Horizontal:
if section%2==0:
return "x"
else:
return "y"
else:
return "{}".format(section+1)
评论列表
文章目录