This commit is contained in:
朱子楚\zhuzi
2024-04-03 11:28:18 +08:00
parent a95916ab03
commit eb4ec242b1
3 changed files with 2 additions and 19 deletions

View File

@ -101,7 +101,7 @@ void FluTreeModel::checkRow(int row,bool checked){
}
itemData->_checked = checked;
}
Q_EMIT layoutChanged();
Q_EMIT dataChanged(index(0,0),index(rowCount()-1,0));
QList<FluTreeNode*> data;
foreach (auto item, _dataSource) {
if(!item->hasChildren()){
@ -302,8 +302,7 @@ void FluTreeModel::dragAndDrop(int dragIndex,int dropIndex,bool isDropTopArea){
destChildren->insert(targetIndex,dragItem);
}
changePersistentIndex(index(qMin(dragIndex,dropIndex),0),index(qMax(dragIndex,dropIndex),0));
Q_EMIT layoutChanged();
Q_EMIT dataChanged(index(0,0),index(rowCount()-1,0));
}
bool FluTreeModel::hitHasChildrenExpanded(int row){