I don't understand why this code not executed when Qt development Framework not installed.

Qt Code:
  1. ....
  2. ....
  3.  
  4. extern QSqlDatabase dbFav;
  5.  
  6. void DB::init() // this is static void
  7. {
  8. QDir dir;
  9. if (!dir.exists(CONF_PATH))
  10. dir.mkpath(CONF_PATH);
  11.  
  12. //favorite
  13. dbFav=QSqlDatabase::addDatabase("QSQLITE", "favorite");
  14. dbFav.setDatabaseName(QString("%1/favorite.%2").arg(CONF_PATH).arg(DB_SUFFIX));
  15. dbFav.open();
  16. QStringList tablesFav = dbFav.tables();
  17. QSqlQuery queryFav(dbFav);
  18. if (!tablesFav.contains("folder", Qt::CaseInsensitive)) {
  19. queryFav.exec("CREATE TABLE folder ("
  20. "id integer primary key,"
  21. "nama text not null,"
  22. "id_induk int not null,"
  23. "unique(nama, id_induk)"
  24. ")");
  25. }
  26. }
To copy to clipboard, switch view to plain text mode