mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2025-07-08 12:47:40 +08:00
update
This commit is contained in:
@ -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();
|
||||
};
|
||||
|
Reference in New Issue
Block a user