You should add QtSql.lib
( you can find the name of Qtsql exactly in QT/lib in your computer) by go to Project/Properties/Configuration properties/Linker/Input, add QtSql.lib
to Additional Dependencies
P.S. I used to face this error, and the error is fixed by this way. Good luck