if (role != Qt.ItemDataRole.DisplayRole)\r
return null;\r
\r
- if (orientation == Qt.Orientation.Horizontal && section < headers.length) { \r
+ if (orientation == Qt.Orientation.Horizontal && section < headers.length && section >=0) { \r
return headers[section];\r
}\r
return null;\r