To include the definitions of the module’s classes, use the following directive:
#include <QtSql>To link against the module, add this line to your qmake .pro file:
QT += sqlThe QtSql module is part of the Qt Full Framework Edition and the Open Source Versions of Qt .
See the SQL Programming guide for information about using this module in your applications.