title: Qt SQL query.exec Always Returning True
body: <p>Im creating a login system in qt using a database but when I run the query in qt it is always returning true, even when that item is false.</p>
  
  <p>The sql database connection code is below </p>
  
  <pre><code>QSqlDatabase login = QSqlDatabase::addDatabase("QSQLITE");
  login.setDatabaseName("/Users/Daniel/Dropbox/Stock_Control.sqlite");
  if(!login.open())
      ui-&gt;label-&gt;setText("Unable To Connect To Database");
  </code></pre>
  
  <p>The SQL query code is below</p>
  
  <pre><code>static Home *home = new Home;
  QSqlQuery query;
  QString Username = ui-&gt;Username_lineEdit-&gt;text();
  QString Password = ui-&gt;Password_lineEdit-&gt;text();
  if(query.exec("SELECT * FROM Program_account WHERE Login = '"+ Username +"' AND Password = '"+ Password +"' "))
  {
      tries = 0;
      home-&gt;show();
      close();
  }
  </code></pre>
  
  <p>Thank you</p>