Now that we have learned how to set up a functional MySQL/MariaDB database system, let's move a step further and discover the database connection module in Qt!
Before we continue working on our login page from the previous chapter, let's start off with a new Qt project first so that it's easier to demonstrate the functionality solely related to database connection and so that we don't get distracted by the other stuff. This time, we'll go for the Terminal-style application called Qt Console Application, as we don't really need any GUI for this demonstration:
After you have created the new project, you should only see two files in the project, that is, [project_name].pro and main.cpp:
The first thing you need to do is to open up your project file (.pro), which in my case is DatabaseConnection.pro, and add the sql keyword...