Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QSQLITE driver not loaded
Hi everyone, I'm quite new to Qt. I'm now making a project which connects to a Sqlite database. When I run it in Debug mode everything seems ok but when i switch to Release mode it says :
QSqlDatabase: QSQLITE driver not loaded
QSqlDatabase: available drivers:
I've searched this problem on many websites but i couldn't solve this problem. Can anyone help me!
Nisix last edited by
@Anh-Phan Hi ! If you use Qt on Windows you need to past the .dll sqlite on your project files too.
Like this : %pathofproject% /project/debug/ PASTE HERE THE DLL.
Anh Phan last edited by Anh Phan
Oh thank you very much. It works perfectly when i run the .exe file in Debug folder, but the .exe file in Release folder still has the old problem.
Just to be sure I understand.
Do you run the RELEASE build from the Creator or
do you try to run with the .exe in the release folder?
@mrjj I run both of them and receive the same error.
did u try to run it from Creator with the SQLIte Dll in RELEASE folder ?
I will give it a try
@mrjj i tried but it still has this problem.
Can you try with this test project
Works for me both in DEBUG and RELEASE
running from Creator.
@mrjj I ran it but it still works only in DEBUG mode, in RELEASE it still has QSqlDatabase: QSQLITE driver not loaded error. I'm kinda confused now.
Ok , at least its consistent. :)
Do you use mingw or Visual studio ?
I assume you just use the online installer to install Qt and
have not compiled Qt yourself.
It must be a some sort of path problem.
Im confused too :)
@mrjj i use mingw48_32 to compile, bro.
Hmm . me too.
Sorry I have really no idea how it cannot work when release.
Did you install using the online installer ?
Have you compiled anything yourself?
Can i try your project?
@mrjj Yep, i used the online installer.
Maybe a silly question, but did you check that you currently have the corresponding .dll file in your Qt installation folder ?