Book Image

Qt 6 C++ GUI Programming Cookbook - Third Edition

By : Lee Zhi Eng
Book Image

Qt 6 C++ GUI Programming Cookbook - Third Edition

By: Lee Zhi Eng

Overview of this book

With the growing need to develop GUIs for multiple targets and multiple screens, improving the visual quality of your application has become pivotal in helping it stand out from your competitors. With its cross-platform ability and the latest UI paradigms, Qt makes it possible to build intuitive, interactive, and user-friendly UIs for your applications. The third edition of Qt 6 C++ GUI Programming Cookbook teaches you how to develop functional and appealing UIs using the latest version of Qt 6 and C++. This book will help you learn a variety of topics such as GUI customization and animation, graphics rendering, and implementing Google Maps. You’ll also be taken through advanced concepts such as asynchronous programming, event handling using signals and slots, network programming, and other aspects to optimize your application. By the end of this Qt book, you’ll have the confidence you need to design and customize GUI applications that meet your clients' expectations and have an understanding of best-practice solutions to common problems during the app development process.
Table of Contents (17 chapters)

Look-and-Feel Customization with Qt Designer

Qt 6 allows us to easily design our program’s user interface through a method most people are familiar with. Qt not only provides us with a powerful user interface toolkit, called Qt Designer, which enables us to design our user interface without writing a single line of code, but it also allows advanced users to customize their user interface components through a simple scripting language called Qt Style Sheet.

In this chapter, we’re going to cover the following recipes:

  • Using style sheets with Qt Designer
  • Customizing basic style sheets
  • Creating a login screen using style sheets
  • Using resources in style sheets
  • Customizing properties and sub-controls
  • Styling in Qt Modeling Language (QML)
  • Exposing the QML object pointer to C++