Qt 5.6 | Qt SQL

Qt 5.6.2 Reference Documentation

# Qt SQL

Qt SQL is an essential module which provides support for SQL databases. Qt SQL's APIs are divided into different layers:

- Driver layer
- SQL API layer
- User interface layer

The SQL Programming guide contains information about development using Qt SQL.

## Getting Started

To enable Qt SQL in a project, add this directive into the C++ files:

      #include <QtSql>

To link against the Qt SQL module, add this line to the project file:

      QT += sql

## Related Information

These are links to the API reference materials and related pages.

- C++ Classes
- SQL Examples