Hi

I have problem with this code..
it does not give me any results.
even if i try to use .size() it want work as will.

Qt Code:
  1. QSqlQuery query;
  2. query.prepare("SELECT COUNT(*) AS 'numberOfUsers'\n"
  3. " FROM users AS u );
  4. query.exec();
  5.  
  6. if (!query.isActive())
  7. QMessageBox::warning(this, tr("Database Error"),query.lastError().text());
  8.  
  9. numberOfPages = query.value(0).toInt();
To copy to clipboard, switch view to plain text mode 

I do not want to use the QSqlTableModel as it slew up all the program.
I need fast way to get this COUNT number.

Using Values want work an using Results() did not work as the Handel and .asInt() function in not working as will.

Regards