I'm not sure which signals you mean...layoutAboutToBeChanged() or rowsAboutToBeInserted() perhaps?
I think beginInsertRows() will take care of those things

Anyway, this is how my insert mechanism looks like
Is this what you have in mind?

Qt Code:
  1. bool DomModel::insertRows(int position, int rows, const QModelIndex& parent)
  2. {
  3. DomItem *parentItem;
  4.  
  5. if (!parent.isValid())
  6. parentItem = rootItem;
  7. else
  8. parentItem = static_cast<DomItem*>(parent.internalPointer());
  9.  
  10. //only need to append one child
  11. beginInsertRows(parent, position, position);
  12.  
  13. if(!parentItem->insertChild())
  14. return false;
  15.  
  16. endInsertRows();
  17.  
  18. return true;
  19. }
  20.  
  21. bool DomItem::insertChild()
  22. {
  23. int rows = childItems.count();
  24.  
  25. QDomNode node;
  26. DomItem *item = new DomItem(node, rows+1, this);
  27. domNode.appendChild(node);
  28. childItems.insert(rows+1, item);
  29.  
  30. return true;
  31. }
To copy to clipboard, switch view to plain text mode 

I keep getting the same message(which was written wrong in my last post)

QTreeView::rowsInserted internal representation of the model has been corrupted, resetting.

It looks like bad indexing occurs...but I'm not sure why that happens.