title: Qt: How to connect to SQLite?
body: <p>I installed SQLite3 (unpacked to c:/sqlite), created a database (c:/sqlite/mzsales). Now I am trying to show its content in a QTableView.</p>
  
  <pre><code>QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE");
  db.setHostName("localhost");
  db.setDatabaseName("mzsales");
  bool db_ok = db.open();
  </code></pre>
  
  <p>db_ok is true. Then</p>
  
  <pre><code>QSqlTableModel *model = new QSqlTableModel(0, db);
  model-&gt;setTable("person");
  model-&gt;setEditStrategy(QSqlTableModel::OnManualSubmit);
  bool tbl_ok = model-&gt;select();
  </code></pre>
  
  <p>tbl_ok is false.</p>
  
  <p>What do I do wrong? How do I connect to db? Thanks!</p>