Qt Code:
  1. void DACanTreeModel::addData( QString strId )
  2. {
  3. beginInsertRows(QModelIndex(), rowCount(), rowCount ());
  4. CMessage* pMess = new CMessage();
  5. m_oTreeItems.insert( strId, (QObject*)pMess );
  6. endInsertRows();
  7. }
To copy to clipboard, switch view to plain text mode