Only QtCore and QtGui modules are enabled by default. To add suitable include paths and to link against QtSql module, add this line to your qmake .pro file:
Only QtCore and QtGui modules are enabled by default. To add suitable include paths and to link against QtSql module, add this line to your qmake .pro file:
J-P Nurmi
i am using visual studio 2005 and there is no .pro file!!!!
Last edited by mismael85; 6th March 2008 at 16:55.
That's a pity. Nobody else can build your project with any other compiler then. Because of that, it is ALWAYS a good idea to maintain a qmake .pro file even if you used this or that IDE.
Provided that you're using the Visual Studio integration, you can open context menu over the project item in solution explorer. There's a menu item to choose Qt modules.
J-P Nurmi
mismael85 (6th March 2008)
thank you for your help .
for visual studio i did just as you said and it worked fine.
and for Mingw32-make
i added Qt += sql but it was wrong
because *.pro file is case sensitive and it must be
QT += sql
when i did that every thing worked fine.
thank you again.
Thanks all
i used MinGw with a static version of Qt and i added
Qt += sql
to the *.pro file
and it is also say that there is no such file or directory!!!
The variable name is QT, not Qt.
J-P Nurmi
Bookmarks