title: SortRole in QSortFilterProxyModel is not set
body: <p>I create a <code>qtableview</code> with a custom model and a custom sortfilterproxymodel</p>
  
  <pre><code>IssueTableModel *issueModel = new IssueTableModel(this-&gt;_repository-&gt;getIssueList());
  IssueTableSortFilterProxyModel *proxyModel = new IssueTableSortFilterProxyModel(this);
  proxyModel-&gt;setSourceModel(issueModel);
  this-&gt;_ui-&gt;issuesTable-&gt;setModel(proxyModel);
  </code></pre>
  
  <p>and in the sortfilterproxymodel constructor:</p>
  
  <pre><code>IssueTableSortFilterProxyModel::IssueTableSortFilterProxyModel(QObject *parent) : QSortFilterProxyModel(parent)
  {
      this-&gt;setSortRole(Qt::UserRole);
      this-&gt;setFilterRole(Qt::UserRole);
  }
  </code></pre>
  
  <p>with a custom <code>lessThan</code> method in the proxymodel. but when the data is retrieved via the model <code>data</code> method, only </p>
  
  <ul>
  <li>Qt::DisplayRole</li>
  <li>Qt::DecorationRole</li>
  <li>Qt::FontRole</li>
  <li>Qt::TextAlignmentRole</li>
  <li>Qt::BackgroundRole</li>
  <li>Qt::ForegroundRole</li>
  <li>Qt::CheckStateRole</li>
  <li>Qt::SizeHintRole</li>
  </ul>
  
  <p>are called, but not Qt::UserRole which I need to output the correct sorting data for the model item:</p>
  
  <pre><code>QVariant IssueTableModel::data(const QModelIndex &amp;index, int role) const
      switch (role) {
          case Qt::DecorationRole:
              // Display icons
              switch (index.column()) {
                  [...]
              }
          case Qt::DisplayRole:
              // Display text data
              switch (index.column()) {
                  [...]
              }
          case Qt::UserRole:
              qDebug() &lt;&lt; "USER ROLE!!!!";
              // Return data for sorting/filtering
              switch (index.column()) {
                  [...]
              }
          default:
              return QVariant();
      }
  }
  </code></pre>
  
  <p>So the question is: Why does the <code>data</code> method of the model never get called with Qt::UserRole when sorting the proxymodel?</p>
  
  <p><strong>Solution:</strong></p>
  
  <p>I got the data in the <code>lessThan</code> method via:</p>
  
  <pre><code>bool IssueTableSortFilterProxyModel::lessThan(const QModelIndex &amp;left, const QModelIndex &amp;right) const
  {
      QVariant leftData = sourceModel()-&gt;data(left);
      QVariant rightData = sourceModel()-&gt;data(right);
  
      switch (leftData.type()) {
          case QVariant::Int:
              return leftData.toInt() &lt; rightData.toInt();
          case QVariant::String:
              return leftData.toString() &lt; rightData.toString();
          case QVariant::DateTime:
              return leftData.toDateTime() &lt; rightData.toDateTime();
          default:
              return false;
      }
  }
  </code></pre>
  
  <p>but did not set the second parameter of the <code>data</code> method which specifies the role...</p>
  
  <pre><code>QVariant leftData = sourceModel()-&gt;data(left, Qt::UserRole);
  </code></pre>