title: QFileSystemModel and QSortFilterProxyModel don't work well together?
body: <p>I found that QSortFilterProxyModel can't filter properly when it works with QFileSystemModel. Sometimes it left NOTHING in the view. Can anyone point out where I'm wrong?  </p>
  
  <pre><code>#include "MainWindow.h"
  #include "ui_MainWindow.h"
  #include &lt;QFileSystemModel&gt;
  #include &lt;QSortFilterProxyModel&gt;
  
  MainWindow::MainWindow(QWidget *parent) :
      QMainWindow(parent),
      ui(new Ui::MainWindow)
  {
      ui-&gt;setupUi(this);
      QFileSystemModel *fsm = new QFileSystemModel(this);
      fsm-&gt;setRootPath(".");
  
      QSortFilterProxyModel *sfpm = new QSortFilterProxyModel();
      sfpm-&gt;setDynamicSortFilter(true);
      sfpm-&gt;setSourceModel(fsm);
  
      ui-&gt;tableView-&gt;setModel(sfpm);
      ui-&gt;tableView-&gt;setRootIndex(sfpm-&gt;mapFromSource(fsm-&gt;index(".")));
  
      sfpm-&gt;setFilterRegExp(QRegExp(".*cpp"));
      sfpm-&gt;setFilterKeyColumn(0);
  }
  
  MainWindow::~MainWindow()
  {
      delete ui;
  }
  </code></pre>
  
  <p>In the above code, if I use QRegExp(".*"), it does show all files in current path. You can create a simple project to test this out. </p>