public override QVariant HeaderData(int section, Qt.Orientation orientation, int role) { if (orientation == Qt.Orientation.Horizontal && role == (int)Qt.ItemDataRole.DisplayRole) { return(rootItem.Data(section)); } return(new QVariant()); }
public override QVariant Data(QModelIndex index, int role) { if (!index.IsValid()) { return(new QVariant()); } if (role != (int)Qt.ItemDataRole.DisplayRole) { return(new QVariant()); } TreeItem item = (TreeItem)index.InternalPointer(); return(item.Data(index.Column())); }