Problem deploying qt application using qsqlite on Windows XP/7
Hi. On my research I found that is a very common problem, reading another post I tried to fix this but I' can't. I have a problem with my Qt application that is using qsqlite.dll. The structure of the folder where the app resides is:
app/app.exe
app/qtcore4.dll
app/qtgui4.dll
app/qtsql4.dll
app/data.db3
app/sqldrivers/qsqlite.dll
With this structure I have deployed another applications but with this one I'm having problems. The application loads the main widget but when loading, the QSqlDatabase::lastError().text() raises with the message Driver not loaded Driver not loaded.
Some ideas please?
Re: Problem deploying qt application using qsqlite on Windows XP/7
Hi,
The qsqlite dll I have is named 'qsqlite4.dll', yours seems to be 'qsqlite.dll', check whether this might be the problem on your side.
Re: Problem deploying qt application using qsqlite on Windows XP/7
Maybe try this way:
Quote:
app/app.exe
app/...
...
app/plugins/sqldrivers/qsqlite.dll
and add plugins path for qApp:
Code:
qApp->addLibraryPath("plugins");
Re: Problem deploying qt application using qsqlite on Windows XP/7
The problem with the missing .dll was solved. The qsqlite4.dll file that I was including with my application isn't the correct one.
I'm using the qt-sdk-open source-4.5.0 so the data I will expose is according to this version. When a search is made on C:\Qt (where the sdk is normally installed) for the file qsqlite4.dll we get the following results:
************************************************** **********
Name | Folder | Size
-------------+----------------------------------------------+-------
qsqlite4.dll | C:\Qt\2009.01\bin\sqldrivers | 340 KB
qsqlite4.dll | c:\Qt\2009.01\qt\plugins\sqldrivers | 391 KB
************************************************** **********
I was initially including the first one, and the correct dll to include is the one with 391 KB. My fault!!!
Now I have a question. What's about the qsqlite4.dll of 340 KB file?
Re: Problem deploying qt application using qsqlite on Windows XP/7
Quote:
Now I have a question. What's about the qsqlite4.dll of 340 KB file?
this is the one used by qtcreator compiled with VC