title: QFileSystemModel - Incremental update/pre-emptive update
body: <p>From the Qt documentation:</p>
  <blockquote>
  <p>QFileSystemModel will not fetch any files or directories until setRootPath() is called. This will prevent any unnecessary querying on the file system until that point such as listing the drives on Windows.</p>
  <p>Unlike QDirModel(obsolete), QFileSystemModel uses a separate thread to populate itself so it will not cause the main thread to hang as the file system is being queried. Calls to rowCount() will return 0 until the model populates a directory.  QFileSystemModel keeps a cache with file information. The cache is automatically kept up to date using the QFileSystemWatcher.</p>
  </blockquote>
  <p>I'm using QTreeView together with a sub-classed QFileSystemModel which uses checkable boxes.<br />
  If I call <code>QFileSystemModel::rowCount(index)</code> before an item has been expanded in the tree I will receive '0', regardless of whether there are any subdirectories or files.  However, once it has been expanded the correct row count will then be given when called again.</p>
  <p>I think if you call QFileSystemModel::setRootPath() this will fetch the data from the specified file path, but it seems that it does not 'execute fast enough' (the cache is not updated) before I call <code>QFileSystemModel::rowCount</code> in my code below.</p>
  <pre><code>// Whenever a checkbox in the TreeView is clicked
  bool MyModel::setData(const QModelIndex&amp; index, const QVariant&amp; value, int role)
  {
    if (role == Qt::CheckStateRole)
    {
      if (value == Qt::Checked)
      {
        setRootPath(this-&gt;filePath(index));
        checklist.insert(index);
        set_children(index);
      }
      else
      {
        checklist.remove(index);
        unchecklist-&gt;insert(index);
       }
        emit dataChanged(index, index);
        return true;
     }
  
    return QFileSystemModel::setData(index, value, role);
  }
  
  // Counts how many items/children the node has (i.e. file/folders) 
  void MyModel::set_children(const QModelIndex&amp; index)
  {
      int row = this-&gt;rowCount(index);
  
      qDebug() &lt;&lt; QString::number(row);
  
  }
  </code></pre>
  <p>Is there a way I can pre-emptively gather the sub-folder information before I try to count how many items are contained in that folder?</p>
  <p>Thanks</p>