Skip to content

Commit

Permalink
fix treeview初始化时,设置checked为true无效
Browse files Browse the repository at this point in the history
  • Loading branch information
ToMoree committed Dec 4, 2024
1 parent a8ca78f commit 2f38232
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/FluTreeModel.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "FluTreeModel.h"
#include "FluTreeModel.h"

#include <QMetaEnum>

Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 2f38232

Please sign in to comment.