C++ (Qt)void TreeModelBrowser::updateModelInsertRow(QModelIndex index){ if(index.isValid()) { CommonElement *ce = reinterpret_cast<CommonElement*>(index.internalPointer()); int row = ce->children().length(); beginInsertRows(index,row,row); ce->appendChild(); endInsertRows(); }}