def data(self, index, role = QtCore.Qt.DisplayRole): if (not index.isValid() and index.row() >= len(self._order.rows) and index.column() >= 0 and index.column < self.columnCount() and role == QtCore.Qt.DisplayRole): return QVariant("%d/%d"%(index.column(), index.row())) return QVariant("error") def headerData(self, section, orientation, role = QtCore.Qt.DisplayRole): if role == QtCore.Qt.DisplayRole: if orientation == QtCore.Qt.Horizontal: return QtCore.QVariant(self._columnTitles[section]) else: return QtCore.QVariant("Row %d"%section) return QtCore.QVariant()