Dear all, I have a tree model which is subclassing QAbstractItemModel.
For one specific operation, I need to fully reorganize a complete tree branch. The whole branch indexes are invalidated, including the top branch node. This top branch node is generally selected in the corresponding view when the user triggers the operation, and it should stay selected, despite the model index which is being invalidated. I wanted to use layoutAboutToBeChanged for signalling the operation, but the documentation is not 100% clear on how to use it. What should I pass as the persistent index list? Is this a persistent index on the top branch node since all updates will be made under this common ancestor? The documentation says "Subclasses should update any persistent model indexes after emitting layoutAboutToBeChanged()", what does this mean? - Is "should" to be interpreted as "must otherwise your program may crash and your system may burn"? - Do I need to get the model's persistent index list, iterate over all, and update all those who are in the modified branch? Thanks!
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest