Qt Model/tree view as a wrapper tree display for under-lying tree data-structure



  • Hello,
    I've my own tree data-structure which i want to display using Qt model/tree view framework. The underlying tree structure will changing frequently (like insertion and deletion of children) through its own other interfaces. Do I have to take some extra measures to make sure that the underlying data structure is displayed properly without any breaks?



  • do u think in implementing ur own Model?



  • I've my own tree data structure which is not a model. Now i've another class cMyModel subclassing QAbstractItemModel. This cMyModel acts as a wrapper of my tree data structure. My tree data structure has its own interfaces/methods through which the tree structure will be changing frequently. Hope you understand my case. My question remains the same



  • Yes, you do have to take some measures. One important one is that you need to signal changes in the data store before they happen, as well as when they are done. Otherwise, you'll have problems implementing the model properly.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.