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.