def headerData(self, section, orientation, role=Qt.DisplayRole): if role == Qt.DisplayRole and orientation == Qt.Horizontal: try: return self.COLUMN_HEADERS[section] except IndexError: pass return QAbstractTableModel.headerData(self, section, orientation, role)
def headerData(self, section, orientation, role=Qt.ItemDataRole.DisplayRole): if orientation == Qt.Orientation.Horizontal and role == Qt.ItemDataRole.DisplayRole: return _('Font family') if section == 1 else _('Embedded') return QAbstractTableModel.headerData(self, section, orientation, role)
def headerData(self, section, orientation, role=Qt.DisplayRole): if role == Qt.DisplayRole and orientation == Qt.Horizontal: try: return self.COLUMN_HEADERS[section] except IndexError: pass return QAbstractTableModel.headerData(self, section, orientation, role)
def headerData(self, section, orientation, role=Qt.DisplayRole): if orientation == Qt.Horizontal and role == Qt.DisplayRole: return _('Font family') if section == 1 else _('Embedded') return QAbstractTableModel.headerData(self, section, orientation, role)