HI!

I have a list of descriptors. These descriptors are constantly changing data. I build the tree items in the model from these descriptors.
Qt Code:
  1. m_pMyTreeModel = new CMyTreeModel();
  2. //
  3. m_pMyTreeModel->initializeModel(m_listDescriptors);
  4. //
  5. m_pFilterModel = new CMySortFilterProxyModel(this);
  6. //
  7. m_pFilterModel->setSourceModel(m_pMyTreeModel);
  8. //
  9. m_pTree->setModel(m_pFilterModel);
To copy to clipboard, switch view to plain text mode 
Each descriptor is connected to the item that is created in the model. I am emitting the signals
Qt Code:
  1. layoutAboutToBeChanged()
To copy to clipboard, switch view to plain text mode 
and
Qt Code:
  1. layoutChanged()
To copy to clipboard, switch view to plain text mode 
in a timer so that the data is updated correctly in the view.

The problem is that the code gets very slow with few thousand items (3000+).
I tried to implement the functions for better performance:

Qt Code:
  1. bool hasChildren(const QModelIndex &parent) const;
  2. bool canFetchMore(const QModelIndex &parent) const;
  3. void fetchMore(const QModelIndex &parent);
To copy to clipboard, switch view to plain text mode 

but get stuck with the
Qt Code:
  1. void fetchMore(const QModelIndex &parent);
To copy to clipboard, switch view to plain text mode 
function. In this function i should create the tree items, but the problem is that i have no descriptors here to connect them to the tree items.
I don't know if this is the best approach to update the data in the model. I think that there is a better way to do this, but have no idea how.

Please help.