Reader small image

You're reading from  Qt 6 C++ GUI Programming Cookbook - Third Edition

Product typeBook
Published inApr 2024
PublisherPackt
ISBN-139781805122630
Edition3rd Edition
Right arrow
Author (1)
Lee Zhi Eng
Lee Zhi Eng
author image
Lee Zhi Eng

Lee Zhi Eng is a self-taught programmer who worked as an artist and programmer at several game studios before becoming a part-time lecturer for 2 years at a university, teaching game development subjects related to Unity and Unreal Engine. He has not only taken part in various projects related to games, interactive apps, and virtual reality but has also participated in multiple projects that are more oriented toward software and system development. When he is not writing code, he enjoys traveling, photography, and exploring new technologies.
Read more about Lee Zhi Eng

Right arrow

Creating a login screen with Qt

In this recipe, we will learn how put our knowledge to use and create a functional login screen using Qt and SQLite.

How to do it…

Create your first functional login screen by following these steps:

  1. Open a web browser and go to SQLiteStudio. We will create a new data table called user, which looks like this:
Figure 12.14 – Create a new user table

Figure 12.14 – Create a new user table

  1. Let’s insert our first item of data into the newly created table and set user_employeeID to the ID of an existing employee. In this way, the user account we create will be linked to the data of one of the employees:
Figure 12.15 – The user_employeeID column is linked to the employee’s emp_id column

Figure 12.15 – The user_employeeID column is linked to the employee’s emp_id column

  1. Open Qt Creator and create a new Qt Widgets Application project. We will start off with mainwindow.ui. Place a stacked widget on the canvas and make sure it contains two pages. Then, set up...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Qt 6 C++ GUI Programming Cookbook - Third Edition
Published in: Apr 2024Publisher: PacktISBN-13: 9781805122630

Author (1)

author image
Lee Zhi Eng

Lee Zhi Eng is a self-taught programmer who worked as an artist and programmer at several game studios before becoming a part-time lecturer for 2 years at a university, teaching game development subjects related to Unity and Unreal Engine. He has not only taken part in various projects related to games, interactive apps, and virtual reality but has also participated in multiple projects that are more oriented toward software and system development. When he is not writing code, he enjoys traveling, photography, and exploring new technologies.
Read more about Lee Zhi Eng