Re-engineer the Simple Tree Model
I believe that almost all of you have gone through the simple tree model example. It contains the nested hierarchies of the tree items.
I need some hint and tips if i need to flat down the whole tree - whick means that all the items will be under one single parent QModelIndex().
I think i need to have sub-class QAbstractProxyModel and i am getting confused about what to do do inside the mapToSource and mapFromSource() function.
I have to traverse the source tree recursively and reparent all the source tree item to QModelIndex(). Do i have to do it inside the mapToSource() or inside mapFromSource(). Basically i think i am not sure what these two functions mean. The manual does not illuminate that much .
I request some one who already has a strong grip over the the idea of concept to explain it for me or refer me to any material that did the job.
Looking forward to your helping hand!!!
Perhaps "this":http://www.fioniasoftware.dk/blog/?p=51 will help?
You can also have a look at the FlatModelProxy inside KDE.