title: Using QSqlTableModel to display an SQL view
body: <p>I am working on an application which has a view which generates a report to display to the user. This report is something which I'm needing to filter. Using the SQL support in Qt I've tried using QSqlTableModel with its filtering capabilities, but it doesn't seem to find the view as I get the error "Unable to find table TABLE_NAME". How does one model a view in Qt? I've not been able to find any information specifically on that.</p>
  
  <pre><code>QSqlDatabase connection(Request_Connection("DB Name"));
  QSqlTableModel* pStore(new QSqlTableModel(NULL, connection));
  
  if (connect(connection))
      pStore-&gt;setTable("ViewName");
  </code></pre>