Displaying information from a database on a model view

In this recipe, we will learn how to display multiple sets of data obtained from our SQL database on a model view in our program.

How to do it…

Follow these steps to display information from a database on a model view widget:

  1. We will be using the database table called employee, which we used in the previous example. This time, we need a lot more data in the employee table. Open up your web browser and log in to your phpMyAdmin control panel. Add data for a few more employees so that we can display it later in our program:
    How to do it…
  2. After that, open up Qt Creator, create a new Qt Widgets Application project, ...

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.