Hi
I'm using sqlite with Qt library
Qt Code:
  1. #include <QtSql/QSqlDatabase>
  2. #include <QSqlQuery>
To copy to clipboard, switch view to plain text mode 
this is my code for connection :
Qt Code:
  1. QSqlDatabase mydb = QSqlDatabase::addDatabase("QSQLITE");
  2. mydb.setDatabaseName(QCoreApplication::applicationDirPath() + "/data/27115");
  3. mydb.open();
  4. QSqlQuery query("SELECT * FROM setting");
  5. if (mydb.open())
  6. {
  7. query.exec();
  8. int fieldNo = query.record().indexOf("theme");
  9. while (query.next()) {
  10. ui->cmb_themes->addItem(query.value(fieldNo).toString());
  11. }
  12. }
  13. mydb.close();
To copy to clipboard, switch view to plain text mode 

Now in my system,its work right without any problem,but i copied debug folder in other computer and run, my application cant find db file!!

in other system i installed qt sdk and open myapp.pro on it,and run.. next .. db file could run and worked.why?
in my laptop with Windows7 64 bits , output address is : '.....'-build-desktop-Qt_4_7_4_for_Desktop_-_MinGW_4_4__Qt_SDK__Debug

and in other computer with windows 7 32 bits , output address is : '.....'-build-desktop

thanks before answer