the problem is here:

Qt Code:
  1. QHash<int, CLineElemItem*>::const_iterator iter = m_hashElemItems.constBegin();
  2.  
  3. while(iter != m_hashElemItems.constEnd())
  4. {
  5. iter.value()->setParent(this);
  6.  
  7. int numberOfChildItems = childItems().size();
  8. }
To copy to clipboard, switch view to plain text mode 


this code is inside the parent object. But numberOfChildItems is always zero... I'm missing something, and I bet It's something stupid :P