code: def headerData(self, section, orientation, role=Qt.DisplayRole):
          
  
          if role == Qt.DisplayRole:
              if orientation == Qt.Horizontal:
                  if section < len(self.__horizontal_headers):
                      return self.__horizontal_headers.keys()[section]
              elif orientation == Qt.Vertical:
                  if section < len(self.__vertical_headers):
                      return self.__vertical_headers.keys()[section]
          return QVariant()
docs: Reimplements the :meth:`QAbstractItemModel.headerData` method.
  
          :param section: Section.
          :type section: int
          :param orientation: Orientation. ( Qt.Orientation )
          :param role: Role.
          :type role: int
          :return: Header data.
          :rtype: QVariant