add:

QT += sql

to .pro file.

Thank jpn!!!! I 'm connect to mysql ok.

but:
at the VS2005,need to set the "Build Command Line",
I think i shoud set it is:

qmake -project //if file count or name chanaged,than shoud update the .pro file isn't
qmake
nmake /f Makefile.Debug

So I think can't use the VS2005's Debug function.I will use the command line(nmake)

(excuse for my Chinese English )