Cross-Platform Development with Qt 6 and Modern C++
eBook - ePub

Cross-Platform Development with Qt 6 and Modern C++

Nibedit Dey

Compartir libro
  1. 442 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

Cross-Platform Development with Qt 6 and Modern C++

Nibedit Dey

Detalles del libro
Vista previa del libro
Índice
Citas

Información del libro

Enhance your cross-platform programming abilities with the powerful features and capabilities of Qt 6

Key Features

  • Leverage Qt and C++ capabilities to create modern, cross-platform applications that can run on a wide variety of software applications
  • Explore what's new in Qt 6 and understand core concepts in depth
  • Build professional customized GUI applications with the help of Qt Creator

Book Description

Qt is a cross-platform application development framework widely used for developing applications that can run on a wide range of hardware platforms with little to no change in the underlying codebase. If you have basic knowledge of C++ and want to build desktop or mobile applications with a modern graphical user interface (GUI), Qt is the right choice for you. Cross-Platform Development with Qt 6 and Modern C++ helps you understand why Qt is one of the favorite GUI frameworks adopted by industries worldwide, covering the essentials of programming GUI apps across a multitude of platforms using the standard C++17 and Qt 6 features.Starting with the fundamentals of the Qt framework, including the features offered by Qt Creator, this practical guide will show you how to create classic user interfaces using Qt Widgets and touch-friendly user interfaces using Qt Quick. As you advance, you'll explore the Qt Creator IDE for developing applications for multiple desktops as well as for embedded and mobile platforms. You will also learn advanced concepts about signals and slots. Finally, the book takes you through debugging and testing your app with Qt Creator IDE.By the end of this book, you'll be able to build cross-platform applications with a modern GUI along with the speed and power of native apps.

What you will learn

  • Write cross-platform code using the Qt framework to create interactive applications
  • Build a desktop application using Qt Widgets
  • Create a touch-friendly user interface with Qt Quick
  • Develop a mobile application using Qt and deploy it on different platforms
  • Get to grips with Model/View programming with Qt Widgets and Qt Quick
  • Discover Qt's graphics framework and add animations to your user interface
  • Write test cases using the Qt Test framework and debug code
  • Build a translation-aware application
  • Follow best practices in Qt to write high-performance code

Who this book is for

This book is for application developers who want to use C++ and Qt to create modern, responsive applications that can be deployed to multiple operating systems such as Microsoft Windows, Apple macOS, and Linux desktop platforms. Although no prior knowledge of Qt is expected, beginner-level knowledge of the C++ programming language and object-oriented programming system (OOPs) concepts will be helpful.

]]>

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es Cross-Platform Development with Qt 6 and Modern C++ un PDF/ePUB en línea?
Sí, puedes acceder a Cross-Platform Development with Qt 6 and Modern C++ de Nibedit Dey en formato PDF o ePUB, así como a otros libros populares de Computer Science y Software Development. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
2021
ISBN
9781800208858

Section 1: The Basics

In this section, you will learn the basics and evolution of the framework and how to install Qt on different platforms. Throughout this section, you will learn more about the evolution of Qt. Then, we'll proceed to build our first example program using the latest version of Qt, which is Qt 6. You will be learning about the usage of the Qt Creator IDE. This section will introduce you to Qt Widgets, Qt Designer, and creating custom controls. You will learn about style sheets, QSS files, and theming. This section will also introduce you to Qt Quick and QML.
This section includes the following chapters:
  • Chapter 1, Introduction to Qt 6
  • Chapter 2, Introduction to Qt Creator
  • Chapter 3, GUI Design Using Qt Widgets
  • Chapter 4, Qt Quick and QML

Chapter 1: Introduction to Qt 6

Qt (pronounced cute, not que-tee) is a cross-platform application development framework designed to create great software applications with uniform user interfaces (UIs) for desktop, embedded, and mobile platforms. It provides developers with a great set of tools to design and build great applications without worrying about platform dependency. In this chapter, you will learn the basics about the framework, its history, and how to install Qt on different platforms. You will learn what Qt is and why it is beneficial to use it. By the end of the chapter, you will be able to install Qt and get started on your platform of choice.
In this chapter, we're going to cover the following main topics:
  • Introducing Qt
  • Reasons for using Qt
  • Downloading and installing Qt
  • Building Qt 6 from source

Technical requirements

To get started, you should have a desktop or laptop running on Windows, Linux, or macOS. Please use the updated Windows 10 or Ubuntu 20.04 long-term support (LTS). Alternatively, use the latest version of macOS (newer than macOS 10.14), such as macOS Catalina.
For your integrated development environment (IDE) to run smoothly, your system should have at least an Intel Core i5 processor along with a minimum of 4 gigabytes (GB) of random-access memory (RAM).
You will need an active internet connection to download and install Qt. As a prerequisite, you should also be familiar with C++ as Qt requires C++ programming knowledge.

Introducing Qt

Qt is a cross-platform software development framework for desktop, embedded, and mobile platforms. It follows the philosophy of code less, create more, and deploy everywhere. It supports platforms such as Windows, Linux, macOS, VxWorks, QNX, Android, iOS, and so on. The software also supports several microcontroller units (MCUs) from NXP, Renesas, and STMicroelectronics running on bare metal or FreeRTOS.
Qt was born as an attempt to provide a uniform graphical user interface (GUI) with the same look, feel, and functionality across different platforms. Qt accomplishes that by providing a framework to write code once and ensure that it runs on other platforms with minimal or no modifications. It is not a programming language, but rather a framework written in C++. The Qt framework and tools are dual-licensed under open source and commercial licenses.
Qt uses a modular approach to group related functionalities together. Qt Essentials are the foundation of Qt on all platforms. These modules are general and useful for most Qt-based applications. Essential modules are available for open source usage. Examples of Qt Essentials modules are Qt Core, Qt GUI, Qt QML, Qt Widgets, and so on. There are also special-purpose add-on modules that provide specific functionalities and come with certain license obligations. Examples of add-on modules are Qt 3D, Qt Bluetooth, Qt Charts, Qt Data Visualization, and more. As well as this, there are value-added modules such as Qt Automotive Suite, Qt for Device Creation, and Qt for MCUs, among others available under the commercial license.
To find out more about different Qt modules, visit https://doc.qt.io/qt-6/qtmodules.html.
Qt was released for public use in 1995. Since then, there have been many improvements and major changes. Qt 6 is the new major version of Qt. Its main goals are to remain prepared for the requirements coming in 2020 and beyond, remove obsolete modules, and be more maintainable. With this focus, there are architectural changes in Qt 6 that may break some level of backward compatibility with earlier versions.
Some essential modifications in Qt 6 are outlined here:
  • Introduction of strong typing
  • JavaScript as an optional feature of Qt Modeling Language (QML)
  • Removal of QML versioning
  • Removal of the duplicate data structures between QObject and QML
  • Avoidance of the creation of runtime data structures
  • Compilation of QML into efficient C++ and native code
  • Support for hiding implementation details
  • Better integration of tools
Now that we've covered the basics, let's look at the main reasons for using Qt…

Reasons for using Qt

Qt is a modular, cross-platform application development framework. The biggest misunderstanding about Qt is that many people consider it as a GUI framework. However, Qt is much more than a GUI framework. It not only comprises a GUI module, but also a set of modules to make application development faster and easier to scale on various platforms. The biggest benefit of using Qt is its ability to provide portability to various platforms. Here are some advantages of using Qt for developers:
  • You can create ...

Índice