The QtSql module comes equipped with classes and drivers for accessing databases. To proceed beyond this point, you should have made the necessary configuration during the installation of Qt on your system to enable database access.
For those on the macOS using Homebrew, remember to issue the command as previously described in Chapter 1, Introducing Qt 5.
Linux users have to install the modules and enable the correct flags during compilation to make the QtSql module work, but, for the most part, the instructions in Chapter 1, Introducing Qt 5, should suffice.
The QtSql module is comprised of the following layers:
- UI layer
- SQL API layer
- Driver layer
Each level makes use of classes, as illustrated in the preceding diagram.