Qsqlite linker error
-
For some reason I'm getting linker errors when I try to add sqlite db to my qt project.
!http://s16.postimg.org/cgid420t1/qt_sqlite_linker_error.jpg!@#include <QApplication>
#include <QtSql/QSqlDatabase>int main(int argc, char *argv[])
{
QApplication a(argc, argv);QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE");
db.setDatabaseName("C:/path/to/my/sqlite/file/file.sqlite");
db.open();
db.close();
MainWindow w;
w.show();
return a.exec();
}@@QT += sql@
is set
Any suggestions?
-
just to make sure:
clean your project
rerun qmake
build project again
-
Problem solved. I disabled QML debugging in project menu.