82 """ |
84 """ |
83 if ( |
85 if ( |
84 orientation == Qt.Orientation.Horizontal and |
86 orientation == Qt.Orientation.Horizontal and |
85 role == Qt.ItemDataRole.DisplayRole |
87 role == Qt.ItemDataRole.DisplayRole |
86 ): |
88 ): |
87 try: |
89 with contextlib.suppress(IndexError): |
88 return self.__headers[section] |
90 return self.__headers[section] |
89 except IndexError: |
|
90 pass |
|
91 return QAbstractTableModel.headerData(self, section, orientation, role) |
91 return QAbstractTableModel.headerData(self, section, orientation, role) |
92 |
92 |
93 def data(self, index, role=Qt.ItemDataRole.DisplayRole): |
93 def data(self, index, role=Qt.ItemDataRole.DisplayRole): |
94 """ |
94 """ |
95 Public method to get data from the model. |
95 Public method to get data from the model. |