title: How to get total number of rows/records in an sqlite table
body: <p>i want to know how to get the total number of rows/records in an sqlite table and assign it to a variable. I did this;</p>
  
  <pre><code>    QSqlQuery query("SELECT COUNT(*) FROM class1_bills");
  </code></pre>
  
  <p>But the problem is, how do i assign the result to a variable? 
  I tried; </p>
  
  <pre><code>int rows = query.seek(0);
  </code></pre>
  
  <p>and;</p>
  
  <pre><code>int rows = query.value(0).toInt();
  </code></pre>
  
  <p>Yes, I know doing that accesses just the record at field position  <strong>0</strong> in the table. But it seems Qt's query methods are for accessing particular records at field positions only. If i'm wrong please correct me. So how do i get the total row count in the table?</p>