Book Image

Hands-On GUI Programming with C++ and Qt5

By : Lee Zhi Eng
Book Image

Hands-On GUI Programming with C++ and Qt5

By: Lee Zhi Eng

Overview of this book

Qt 5, the latest version of Qt, enables you to develop applications with complex user interfaces for multiple targets. It provides you with faster and smarter ways to create modern UIs and applications for multiple platforms. This book will teach you to design and build graphical user interfaces that are functional, appealing, and user-friendly. In the initial part of the book, you will learn what Qt 5 is and what you can do with it. You will explore the Qt Designer, discover the different types of widgets generally used in Qt 5, and then connect your application to the database to perform dynamic operations. Next, you will be introduced to Qt 5 chart which allows you to easily render different types of graphs and charts and incorporate List View Widgets in your application. You will also work with various Qt modules, like QtLocation, QtWebEngine, and the networking module through the course of the book. Finally, we will focus on cross-platform development with QT 5 that enables you to code once and run it everywhere, including mobile platforms. By the end of this book, you will have successfully learned about high-end GUI applications and will be capable of building many more powerful, cross-platform applications.
Table of Contents (18 chapters)

Item Views and Dialogs

In the previous chapter, we learned how to display data using different types of chart. Charts are one of many ways to present information to the users on screen. It is very important for your application to present vital information to the users so that they know exactly what's happening to the application—whether data has been saved successfully, or the application is waiting for the user's input, or warning/error messages that the users should be aware of, and so on—it's all very important to ensure your application's user-friendliness and usability.

In this chapter, we will cover the following topics :

  • Working with item view widgets
  • Working with dialog boxes
  • Working with file selection dialogs
  • Image scaling and cropping

Qt provides us with many types of widget and dialog that we can easily use to display important...