Hy all.
I use a QTreeView to show a QDomDocument object. Using drag & drop i makes change to the DOM three.

The issue: when i send the signal to view to update, data goes corrupted, but only in the view.

This is the code:

def dropEvent(self, event):
        oggetto=event.source()
        parent=oggetto.indexAt(event.pos()).parent()  ## this manage the ModelIndex of target when drop

        NomeDest= parent.child(oggetto.indexAt(event.pos()).row(),0).data().toString()
        DestId=self.getValoreCaratteristica(parent.child(oggetto.indexAt(event.pos()).row(),1).data().toString(),"id") ## a function that parse the node to find the specified Attributes (in this case "id")

        DragTargetElem=self.findNodeByTagNameID(NomeDest,DestId) ## this return the QDomNode specified by his name and his id
        targetParent=DragTargetElem.parentNode()
        targetParent.insertBefore(self.view.startDragModelInd, DragTargetElem) ##change the Dom layout

        oggetto.model().emit(QtCore.SIGNAL("layoutChanged()"))  ## HERE, work but treeview display garbage text
 
        print DragTargetElem.ownerDocument().toString()     ##  used to verify the Dom consistence



What error? treeview
display  a Dom without the dragged/dropped node, also the other node is doubled.