Chapter 8. Accessing Databases

In this chapter, we will cover the following recipes:

  • Setting up SQL Driver for Qt
  • Connecting to a database
  • Writing basic SQL queries
  • Creating a login screen with Qt
  • Displaying information from a database on a model view
  • Advanced SQL queries

Introduction

SQL stands for Structured Query Language, a special programming language used to manage data held in a relational database management system. A SQL server is a database system designed to use one of the many types of SQL programming language to manage its data.

Note

If you want to learn more about SQL, visit this link: http://www.w3schools.com/sql/sql_intro.asp.

Qt supports several different types of SQL driver in the form of plugins/add-ons. However, it's very easy to integrate ...

Get Qt5 C++ GUI Programming Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.