This is a simple Qt Quick application (written in QML and C++) that shows how to use a SQLite3 database in your Qt application. It uses the classes from the Qt SQL module, which is part of the standard Qt library.
If you are looking for an equivalent example using QWidgets rather than QML, use QtSqlExample. It provides exactly the same functionality as this example, just with an interface using QWidgets.
This project is based on vivaladav's application QtSqlExample, which he also explains in detail in his blog post How to embed a database in your application with SQLite and Qt.