This commit is contained in:
朱子楚\zhuzi
2023-09-19 23:41:56 +08:00
parent 7ad8c969da
commit 8337e278ff
4 changed files with 169 additions and 228 deletions

View File

@ -9,11 +9,21 @@ Node::Node(QObject *parent)
}
FluTreeModel::FluTreeModel(QObject *parent)
: QAbstractTableModel{parent}
: QAbstractItemModel{parent}
{
dataSourceSize(0);
}
QModelIndex FluTreeModel::parent(const QModelIndex &child) const{
return QModelIndex();
}
QModelIndex FluTreeModel::index(int row, int column,const QModelIndex &parent) const{
if (!hasIndex(row, column, parent) || parent.isValid())
return QModelIndex();
return createIndex(row, column, _rows.at(row));
}
int FluTreeModel::rowCount(const QModelIndex &parent) const {
return _rows.count();
};