fix treeview初始化时,设置checked为true无效

This commit is contained in:
ToMoree 2024-12-04 13:49:22 +08:00
parent a8ca78f3f1
commit 2f38232dcf

View File

@ -1,4 +1,4 @@
#include "FluTreeModel.h"
#include "FluTreeModel.h"
#include <QMetaEnum>
@ -126,6 +126,7 @@ void FluTreeModel::setDataSource(QList<QMap<QString, QVariant>> data) {
node->_parent = _root;
_root->_children.append(node);
}
node->_checked = item.value("checked").toBool();
_dataSource.append(node);
if (item.contains("children")) {
QList<QVariant> children = item.value("children").toList();