title: Removing rows from QTreeWidget (qt programming)
body: <p>what's the best way to remove a row (QTreeWidgetItem) from a QTreeWidget?</p>
  
  <p>The QTreeWidget content has been set by:</p>
  
  <pre><code>myQTreeWidget-&gt;insertTopLevelItems(0, items); // items = QList&lt;QTreeWidgetItem*&gt;
  </code></pre>
  
  <p>then I remove an item from my QList "items" and I try to clear/reset the QTreeWidget</p>
  
  <pre><code>packList-&gt;clear();    
  packList-&gt;insertTopLevelItems(0, items);
  </code></pre>
  
  <p>but my app crashes here!
  Suggestions?</p>