How it works…

Qt provides us with SQL drivers so that we can easily connect to different types of SQL Servers without implementing them ourselves.

Currently, Qt officially supports SQLite, MySQL, ODBC, and PostgreSQL. SQL architectures that are forks from one of the supported architectures, such as MariaDB (a fork of MySQL), may still be compatible with Qt without much hassle. If you are using an architecture that isn't supported by Qt, you can still interact with your SQL database indirectly by sending an HTTP request using QNetworkAccessManager to your backend script (such as PHP, ASP, and JSP), which can then communicate with the database.

If you only need a simple file-based database and don't plan to use a server-based database, SQLite is a good choice for you.

In the Connecting to a database recipe, we will learn how to connect to our SQL database using Qt's SQL module.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset