the problem is here:
QHash<int, CLineElemItem*>::const_iterator iter = m_hashElemItems.constBegin();
while(iter != m_hashElemItems.constEnd())
{
iter.value()->setParent(this);
int numberOfChildItems = childItems().size();
}
QHash<int, CLineElemItem*>::const_iterator iter = m_hashElemItems.constBegin();
while(iter != m_hashElemItems.constEnd())
{
iter.value()->setParent(this);
int numberOfChildItems = childItems().size();
}
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
Bookmarks