Example #1
0
    def headerData(self, section, orientation, role=Qt.DisplayRole):
        if role == Qt.DisplayRole and orientation == Qt.Horizontal:
            return self._columns[section]
        elif role == Qt.DisplayRole and orientation == Qt.Vertical:
            return self._row_labels[section]

        return QStandardItemModel.headerData(self, section, orientation, role)
Example #2
0
    def headerData(self, section, orientation, role=Qt.DisplayRole):
        if role == Qt.DisplayRole and orientation == Qt.Horizontal:
            return self._column_names[section]

        return QStandardItemModel.headerData(self, section, orientation, role)