TreeItem *TreeModel::getItem(const QModelIndex &index) const{ if (index.isValid()) { TreeItem *item = static_cast<TreeItem*>(index.internalPointer()); if (item) return item; } return rootItem;}
QModelIndex knowtreemodel::get_item_index(TreeItem *item){ int itemrow=item->childNumber(); return QAbstractItemModel::createIndex(itemrow,0,item->parent());}
return this->createIndex(itemrow,0,item->parent());