title: How to forward signals in a QAbstractItemModel wrapper model
body: <p>I intend to create my own item model, derived from QAbstractItemModel. The model does not contain data but wraps some data repository. That repository emits signals after item(s) are insert, removed, renamed, etc. </p>
  
  <p>Whenever something changes in the repository, my item model needs to forward those signals.</p>
  
  <p>However the repository has standalone signals like <code>void itemRemoved(int index);</code> while QAbstractItemModel has begin/end pairs of protected functions (and signals) like <code>beginInsertRows()</code> and <code>endInsertRows()</code>.</p>
  
  <p>How should I handle this? E.g. I could connect a slot like the following to the repository's <code>itemRemoved()</code> signal:</p>
  
  <pre><code>void RepositoryItemRemoved(int i)
  {
     beginInsertRows(QModelIndex(), i, i);
     endInsertRows();
  }
  </code></pre>
  
  <p>Based on the above example: Is it valid to call <code>beginInsertRows()</code> / <code>endInsertRows()</code> sequently <em>after</em> a row has been inserted in the repository?</p>