bool insertRows(int pos, int rows, const QModelIndex &ind){ beginInsertRows(ind, pos, pos+rows-1); for(int i=0; i<rows; i++) { if(hasName(i)) hash[getName(i)] = getValue(i); } endInsertRows(); return true;}
void MyModel::insertMyRow(const QString& key, const MyData& data){ beginInsertRows(...); m_sourceHash[key] = data; endInsertRows(...);}
void MyModel::insertMyRow(const QString& key, const MyData& data)
beginInsertRows(...); m_sourceHash[key] = data; endInsertRows(...);