Itemview (insert in modal)
Hi i have a long tree and every node can have n number of child, If I need to copy one of the root node which has n number of child and paste that in another node, I want that another node should have every child node of the copied node copied in it as if they were there own child nodes.
any hint how to do it?
Use a [[doc:QSortFilterProxyModel]]. Reimplement the filterAcceptsRow() method to only return true if the row belongs to (a decendant of) the item you're interested in. Create an instance of your proxy model, set the source model to your original model, and use the proxy model as the model for your filtered view.
Andre: I think you missed the whole point, I want my original source model modified when this copy paste happens, If Node five gets copied and pasted to node three then i have insert this node five in model under child of node three.
I was wondering how to insert this recursive index(of childs) which Node five might have.