March 13, 2011

neel2818 neel2818
Lab Rat
57 posts

QSqldatabase and QT creator

 

HI All,

I am working on QSqldatabase and i have following problem.
I have create connection and but when i compile my code i am facing compilation error that QSqldatabase not declared. I have added in pro file QT += sql but i think something is missing.

Is there any dll that will add support for QSql ?

Thanks,
Neel

4 replies

March 13, 2011

mlong mlong
Robot Herder
1551 posts

You are using are using QSqlDatabase, and not QSqldatabase, right?

 Signature 

Senior Software Engineer
AccuWeather Enterprise Solutions
/* My views and opinions do not necessarily reflect those of my employer.  Void where prohibited. */

March 13, 2011

ZapB ZapB
Hobby Entomologist
1423 posts

  1. #include <QSqlDatabase>

and as mlong said notice the capitalisation you are using is incorrect.

 Signature 

Nokia Certified Qt Specialist
Interested in hearing about Qt related work

March 13, 2011

Andre Andre
Robot Herder
6296 posts

Did you add the SQL module in your .pro file for the Qt configuration?

  1. QT+= SQL

 Signature 

Looking for Qt developers to join our team @ i-Optics: https://qt-project.org/forums/viewthread/25393/

March 13, 2011

ZapB ZapB
Hobby Entomologist
1423 posts

Also make sure that qmake has been re-run since you added QT += SQL so that the Makefiles (or equivalent) have been updated to include the necessary include and library paths etc.

 Signature 

Nokia Certified Qt Specialist
Interested in hearing about Qt related work

 
  ‹‹ [solved] Linking Nokia Qt with OpenVC      Using OpenGL ››

You must log in to post a reply. Not a member yet? Register here!