title: QStandardItemModel not always updating a QTreeView
body: <p>I'm developing a GUI C++/Qt FTP (Windows/Ubuntu) client based on my C++ FTP client class (libcURL wrapper).</p>
  
  <p>I use a QTreeView to display remote FTP folders/files. When the user clicks on a subdirectory, I take back the index of the selected directory and I add items to it:</p>
  
  <pre><code>QStandardItemModel* m_DistantModel; // from GUI thread class
  QModelIndex*  m_SelectedIndex; // from FTPThread class
  const MzFTP* m_pOwner; // from FTPThread class
  //....
  QStandardItem* item;
  QStandardItem* itemParent;
  //....
  item = new QStandardItem(QIcon(QStringLiteral(":/icons/file.png")),QString::fromStdString(itFTPItem));
  itemParent = m_pOwner-&gt;m_DistantModel-&gt;itemFromIndex(*m_SelectedIndex);
  itemParent-&gt;appendRow(item);
  </code></pre>
  
  <p>The added rows to the selected element (itemParent) don't always show up in the QTreeView, in Windows, they always show up in the release build but not in the debug one (I must debug step by step so they can be shown) on Ubuntu it's the inverse : in Debug mode they always show up but not in the release.</p>
  
  <p>How can I refresh the QStandardItemModel just like the QDirModel with the refresh method() or another technique?</p>
  
  <p>UPDATE: If "item" is dynamically allocated in the worker thread heap (that I delete after it's finished), does its heap disappears too ?</p>