Home > Mobile >  QT5 after the release of sqlite can not create the database???????
QT5 after the release of sqlite can not create the database???????

Time:12-14

Development time can be read normal create

Code is
 
QSqlDatabase db=QSqlDatabase: : addDatabase (" QSQLITE ");
Db. SetDatabaseName (" _usr. Db ");

Through windeployqt packing, normal, the program can run normally open, but the database file didn't build it with the database related functions are all failed
Sqldrivers here are three files qsqlite. DLL qsqlodbc. DLL QSQLPSQL. DLL
After packaging the default driver has ah, how the database is to create not to come out???????

CodePudding user response:

Found the reason, I thought it was 360, the original is to create the database code to write in the QApplication a (arg c, argv); Later, after application initialization to create the database?? I test, write directly in the main function of the first line, why the development of the local debugging time do not have this problem? The bug?
  •  Tags:  
  • Qt
  • Related