Skip to content

Commit

Permalink
Merge pull request #578 from ToMoree/add_init_checked_for_treeview
Browse files Browse the repository at this point in the history
fix treeview初始化时,设置checked为true无效
  • Loading branch information
zhuzichu520 authored Dec 24, 2024
2 parents bb537f4 + 2f38232 commit 1beb900
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 1beb900

Please sign in to comment.