[SOLVED]QSqlDatabase
-
wrote on 17 Apr 2013, 21:29 last edited by
Are you including <QSqlDatabase> in the file where you are trying to establish the connection? Also,
try to get the list of available drivers with QSqlDatabase::drivers(). -
wrote on 17 Apr 2013, 21:38 last edited by
That's what I include:
!http://i47.tinypic.com/2hfnyhk.jpg(include)!And it still gives me error, for the drivers():
@C:\Users\Nick\Documents\QT_Projects\HotelManagement\mainwindow.cpp:38: error: undefined reference to `_imp___ZN12QSqlDatabase7driversEv'@ -
wrote on 17 Apr 2013, 21:43 last edited by
OMG, that was crazy haha
i had in my .pro file
@QT += core gui@
and i thought that i had to just add the 'sql' like the methods below...
and that's why it didn't work...
ooooh my gooodthanks a lot guys, and sorry for disturbing so much
SOLVED
-
wrote on 17 Apr 2013, 21:46 last edited by
Nice, don't forget to mark your thread's title as [SOLVED].
21/24