Hello, I have a sqlite db file, it name is "tomek.sqlite". In this db I have a one table name: "am_tankowania"

In code, I put:
Qt Code:
  1. QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE");
  2.  
  3. db.setDatabaseName("tomek.sqlite");
  4. if(db.open()) QMessageBox::information(0,"Ok","Connection ok");
  5. else QMessageBox::information(0,"Error","some error.");
To copy to clipboard, switch view to plain text mode 

The MessageBox ok - connection ok show. Now, I have a query:

select * from am_tankowania:

Qt Code:
  1. QSqlQuery query("SELECT * am_tankowania");
  2. if (query.lastError().isValid()) QMessageBox::critical(0,"Error",query.lastError().text() );
To copy to clipboard, switch view to plain text mode 

I see an error:
no such table table: am_tankowania Unable to execute statement :/

What i'm doing wrong?

Thank you.