Book Image

Qt5 C++ GUI Programming Cookbook - Second Edition

By : Lee Zhi Eng
Book Image

Qt5 C++ GUI Programming Cookbook - Second 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 becomes important so that it stands 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 user interfaces for your applications. Qt5 C++ GUI Programming Cookbook, Second Edition teaches you how to develop functional and appealing user interfaces using the latest version of QT5 and C++. This book will help you learn a variety of topics such as GUI customization and animation, graphics rendering, implementing Google Maps, and more. You will also be taken through advanced concepts like asynchronous programming, event handling using signals and slots, network programming, various aspects of optimizing your application. By the end of the book, you will be confident to design and customize GUI applications that meet your clients' expectations and have an understanding of best practice solutions for common problems.
Table of Contents (15 chapters)

Profiling and optimizing QML

The QML engine in Qt 5 took advantage of hardware acceleration to make its rendering capability and performance superior to the old widgets user interface. However, it does not mean that you should not care about optimization; that is because small performance issues may snowball into bigger problems over time and causing damage to your product's reputation.

How to do it...

Follow these steps to start profiling and optimizing a QML application:

  1. Let's create a Qt Quick Application - Empty project:
  1. Then, go to Analyze | QML Profiler and run the QML Profiler tool:
  1. Your Qt Quick project will then be ran by the QML Profiler. The QML Profiler window will also appear under the code editor...