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

@ -2386,14 +2386,6 @@ Some contents...</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>T_TreeView2</name>
<message>
<location filename="qml/page/T_TreeView2.qml" line="10"/>
<source>TreeView2</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>T_Typography</name>
<message>

View File

@ -2469,14 +2469,6 @@ Some contents...</source>
<translation type="unfinished">%1</translation>
</message>
</context>
<context>
<name>T_TreeView2</name>
<message>
<location filename="qml/page/T_TreeView2.qml" line="10"/>
<source>TreeView2</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>T_Typography</name>
<message>

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){