Reputation: 477
I am very new to Qt and as well as Qt with database. Hope I get a positive response from you end.
I am using the code written in this forum for finding the Google drive folder path.
I made a successful progress till building by solving all the errors. The build was successful, But while running I get the following error
QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers:
Error in Opening Google Drive db
I know I missing somewhere the configuration of SQLite with Qt.
I just updated the pro file with Qt += sql
I can find the folders C:\Qt\4.8.5.x64\src\3rdparty\sqlite
, C:\Qt\4.8.5.x64\src\plugins\sqldrivers\sqlite
in my system.
How to make the QSqlDatabase
to link to this folder?
Or is there any separate installation for SQLite need to done for this or the libraries provided by the Qt itself is enough to support the database operation.
I have googled a lot, but didn't get any answers. Please let me know the steps to configure the SQLite.
Upvotes: 1
Views: 7381
Reputation: 710
Look at C:\Qt\4.8.5.x64\plugins\sqldrivers
do you see there qsqlite4.dll
?
If not, than you should compile Qt with parameter -plugin-sql-sqlite
if it static build, and compile qsqlite plugin manually if it shared.
cd %QTDIR%\src\plugins\sqldrivers\sqlite.pro
nmake
nmake install
nmake clean
Upvotes: 1