| 177 | } |
| 178 | |
| 179 | QVariant TreeModel::headerData(int section, Qt::Orientation orientation, int role) const { |
| 180 | if (orientation == Qt::Horizontal && role == Qt::DisplayRole) |
| 181 | return rootItem->data(section); |
| 182 | |
| 183 | return {}; |
| 184 | } |
| 185 | |
| 186 | QModelIndex TreeModel::index(int row, int column, const QModelIndex& parent) const { |
| 187 | if (parent.isValid() && parent.column() != 0) |