title: QT sqlite how to know when there are no more results?
body: <p>I want to know when I got the last result returned for my query.</p>
  
  <p>My current code:</p>
  
  <pre><code>if (db.isOpen()) {
  
      QSqlQuery query(db);
  
      ret = query.exec(QString("select * from history WHERE cID = '%1' order by date(time) ASC;").arg(channel));
  
      if (ret) {
          while (query.next()) {
  
              // How can i know that there are no more results to loop through here?
              addMessage(query.value(1).toString(), query.value(2).toString(), timeStr, "NO"); 
          }
      }
  }
  </code></pre>
  
  <p>Any ideas?</p>