title: QSqlTableModel empty result
body: <p>If I do this:</p>
  
  <pre><code>QSqlQuery searchQuery(QString("select * from people where id = %1").arg(1));
  if (searchQuery.next())
    {
    std::cout &lt;&lt; "Name: " &lt;&lt; searchQuery.value(1).toString().toStdString() &lt;&lt; std::endl;
    }
  </code></pre>
  
  <p>The output is (as expected):</p>
  
  <pre><code>Name: David
  </code></pre>
  
  <p>However, if I do this:</p>
  
  <pre><code> QSqlTableModel *model = new QSqlTableModel;
      // Set used table
      model-&gt;setTable("people");
      model-&gt;setEditStrategy(QSqlTableModel::OnManualSubmit);
  // Set where clause
  model-&gt;setFilter(QString("id=%1").arg(1));
  model-&gt;select();
  
  // Read result
  QSqlRecord record = model-&gt;record();
  if (!record.isEmpty())
    {
    std::cout &lt;&lt; "Name from model: " &lt;&lt; record.value(1).toString().toStdString();
    }
  </code></pre>
  
  <p>The record is not empty, but the output is blank:</p>
  
  <pre><code>Name from model: 
  </code></pre>
  
  <p>Can anyone see what have I done wrong using the QSqlTableModel?</p>
  
  <p>Also, with both methods, I don't understand how you don't have to tell it which database to use (i.e. I instantiate a QSqlDatabase and .open() it, but I never tell the query to operate on the database?)</p>
  
  <p>Thanks,</p>
  
  <p>David</p>