title: Speed up QSortFilterProxyModel filtering when dealing with nearly large data sets
body: <p>Before, i asked <a href="http://doc.qt.io/qt-4.8/qstring.html#contains-6" rel="noreferrer"><code>a question</code></a> about multiple column filtering that we need to represent rows that fit more than one filter pattern.</p>
  
  <p>Now when dealing with big tables (by <code>big</code> i mean about 200,000 rows and 4 columns) filtering get slow if we have a table that big (normally this is worst for the first 2 char of filter pattern).</p>
  
  <p>So what is your suggestion on this?</p>
  
  <p>Note : i have my own high performance source data model (instead of <code>QStandardItemModel</code>) based on <a href="https://github.com/antis81/QtModelViewDemo" rel="noreferrer"><code>this</code></a> example witch feed my view for that number of rows in about 1 sec</p>
  
  <h1>Edit 1</h1>
  
  <p>Changing my method from this :</p>
  
  <pre><code>bool filterAcceptsRow(int source_row, const QModelIndex &amp;source_parent) const {
  if (/* filtering is enable*/) {
      bool _res = sourceModel()-&gt;data(sourceModel()-&gt;index(source_row, 0, source_parent)).toString().contains( /*RegExp for column 0*/);
      for (int col = 0; col &lt; columnCount(); col++) {
          _res &amp;= sourceModel()-&gt;data(sourceModel()-&gt;index(source_row, col + 1, source_parent)).toString().contains(/*RegExp for column col + 1*/);
      }
      return _res;
  }
  return true;
  </code></pre>
  
  <p>}</p>
  
  <p>To this :</p>
  
  <pre><code>bool DataFilter::filterAcceptsRow(int source_row, const QModelIndex &amp;source_parent) const {
      if (_enable) {
          return (sourceModel()-&gt;index(source_row, 0, source_parent.child(source_row, 0)).data().toString().contains( /*string for column 0*/ ))
              &amp;&amp; sourceModel()-&gt;index(source_row, 1, source_parent.child(source_row, 1)).data().toString().contains(/*string for column 1*/))
              &amp;&amp; sourceModel()-&gt;index(source_row, 2, source_parent.child(source_row, 2)).data().toString().contains(/*string for column 2*/))
              &amp;&amp; sourceModel()-&gt;index(source_row, 3, source_parent.child(source_row, 3)).data().toString().contains(/*string for column 3*/));
      }
      return true;
  }
  </code></pre>
  
  <p>Look works Perfect.Now filtering work like a charm without delay</p>