ENGLISH

Cross-Platform Development with Qt 6 and Modern C++: Design and build applications with modern graphical user interfaces without worrying about platform dependency

Book information

Publisher
Packt Publishing
Year
2021
ISBN
1800204582, 9781800204584
Language
english
Format
PDF
Filesize
12 MB (12305006 bytes)
Pages
442\443
Time added
2021-06-26 08:10:49

Description

Enhance your cross-platform programming abilities with the powerful features and capabilities of Qt 6 Key FeaturesLeverage Qt and C++ capabilities to create modern, cross-platform applications that can run on a wide variety of software applicationsExplore what's new in Qt 6 and understand core concepts in depthBuild professional customized GUI applications with the help of Qt CreatorBook 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 learnWrite cross-platform code using the Qt framework to create interactive applicationsBuild a desktop application using Qt WidgetsCreate a touch-friendly user interface with Qt QuickDevelop a mobile application using Qt and deploy it on different platformsGet to grips with Model/View programming with Qt Widgets and Qt QuickDiscover Qt's graphics framework and add animations to your user interfaceWrite test cases using the Qt Test framework and debug codeBuild a translation-aware applicationFollow best practices in Qt to write high-performance codeWho 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. Table of ContentsIntroduction to Qt 6Introduction to Qt CreatorGUI Design Using Qt WidgetsQt Quick and QMLCross-Platform DevelopmentSignals and SlotsModel View ProgrammingGraphics and AnimationsTesting and DebuggingDeploying Qt ApplicationsInternationalizationPerformance Considerations Title page Copyright and Credits Contributors About the author About the reviewers Table of Contents Preface Who this book is for What this book covers To get the most out of this book Download the example code files Download the color images Conventions used Get in touch Reviews Section 1: The Basics Chapter 1: Introduction to Qt 6 Technical requirements Introducing Qt Reasons for using Qt Downloading and installing Qt Downloading Qt Installing Qt on Windows Installing Qt on Linux Installing Qt on macOS Updating or removing Qt Building Qt 6 from source Installing Qt on Windows from source Installing Qt on Linux from source Installing Qt on macOS from source Summary Chapter 2: Introduction to Qt Creator Technical requirements Exploring the Qt Creator UI Building a simple Qt application Understanding advanced options Managing kits Qt Versions Environment Keyboard shortcuts Text Editor Splitting the coding window Build options Qt Assistant Summary Chapter 3: GUI Design Using Qt Widgets Technical requirements Introducing Qt widgets Creating a UI with Qt Designer Managing layouts QVBoxLayout QHBoxLayout QGridLayout Creating custom widgets Creating Qt Style Sheets and custom themes Using a QSS file Exploring custom styles Creating a custom style Using a custom style Using widgets, windows, and dialogs Summary Chapter 4: Qt Quick and QML Technical requirements Getting started with QML and Qt Quick Understanding the QML type system Understanding Qt Quick Controls Styling Qt Quick Controls Creating a simple Qt Quick application Designing a UI with Qt Quick Designer Positioners and layouts in QML Manual positioning Positioning with anchors Positioners Repeater Qt Quick Layouts Integrating QML with C++ Embedding C++ objects into QML with context properties Registering a C++ class with the QML engine Creating a QML extension plugin Invoking QML methods inside a C++ class Exposing a QML object pointer to C++ Integrating QML with JS Importing a directory in QML Handling mouse and touch events MouseArea MultiPointTouchArea TapHandler SwipeView Summary Section 2: Cross-Platform Development Chapter 5: Cross-Platform Development Technical requirements Understanding cross-platform development Understanding compilers Adding custom compilers Building with qmake Qt Project (.pro) files Understanding differences between .pro and .pri files Understanding build settings Platform-specific settings Using Qt with Microsoft Visual Studio Running a Qt application on Linux Running a Qt application on macOS and iOS Configuring Qt Creator for iOS Configuring Qt Creator for Android Other Qt-supported platforms Porting from Qt 5 into Qt 6 Summary Section 3: Advanced Programming, Debugging, and Deployment Chapter 6: Signals and Slots Technical requirements Understanding Qt signals and slots Understanding syntax Declaring signals and slots Connecting the signal to the slot Connecting a single signal to multiple slots Connecting multiple signals to a single slot Connecting a signal to another signal The working mechanism of Qt signals and slots Qt's meta-object system MOC generated code Getting to know Qt's property system Reading and writing properties with the Meta-Object System Using signals and slots in Qt Designer Understanding signals and the handler event system in QML Adding a signal in QML Connecting a signal to a function Connecting a signal to a signal Defining property attributes and understanding property binding Integrating signals and slots between C++ and QML Understanding events and the event loop Managing events with an event filter Drag and drop Drag and drop in Qt Widgets Drag and drop in QML Summary Chapter 7: Model View Programming Technical requirements Understanding the M/V architecture Model Delegate Views in Qt Widgets Creating a simple Qt Widgets application using the M/V pattern Understanding Models and Views in QML Views in Qt Quick Models in Qt Quick Using C++ Models with QML Summary Chapter 8: Graphics and Animations Technical requirements Understanding Qt's graphics framework QPainter and 2D graphics Understanding the paint system Using the coordinate system Drawing and filling Drawing with QPainter Introducing the Graphics View framework Understanding the Qt OpenGL module Qt OpenGL and Qt Widgets Graphics in Qt Quick Qt OpenGL and Qt Quick Custom Qt Quick items using QPainter Understanding the Qt Quick scene graph Qt Quick scene graph structure Rendering using a scene graph Using a scene graph with the Native Graphics 3D graphics with Qt Quick 3D Shader effects Using the Canvas QML type Understanding particle simulations Animation in Qt Widgets Animation and transitions in Qt Quick Controlling animations States, state machine, and transitions in Qt Quick The state machine in Qt Widgets Summary Chapter 9: Testing and Debugging Technical requirements Debugging in Qt Debuggers supported by Qt Debugging strategies Debugging a C++ application Debugging a Qt Quick application Testing in Qt Unit testing in Qt Integrating with Google's C++ testing framework Testing Qt Quick applications GUI testing tools The Linux Desktop Testing Project (LDTP) GammaRay Squish Summary Chapter 10: Deploying Qt Applications Technical requirements Understanding the need for deployment Choosing between static and dynamic libraries Deploying on desktop platforms Deploying on Windows Windows deployment tool Deploying on Linux Deploying on macOS Using Qt Installer Framework Deploying on Android Other installation tools Summary Chapter 11: Internationalization Technical requirements Understanding internationalization and Qt Linguist Writing source code for translation Loading translations in a Qt application Switching languages dynamically Internationalization with Qt Widgets Adding dynamic translation to a Qt Widgets application Internationalization with Qt Quick Translating dynamically in a Qt Quick application Deploying translations Summary Chapter 12: Performance Considerations Technical requirements Understanding performance optimization Optimizing C++ code Using concurrency, parallelism, and multithreading Profiling a Qt Quick application using QML Profiler and Flame Graph Other Qt Creator analysis tools Optimizing graphical performance Creating benchmarks Different analysis tools and optimization strategies Memory profiling and analysis tools Optimizing during linking Building a Qt application faster Performance considerations for Qt Widgets Learning best practices of QML coding Summary Why subscribe? Other Books You May Enjoy Packt is searching for authors like you Leave a review - let other readers know what you think Index

Similar books

Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36

Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36

2010 · PDF

THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.

THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.

1858 · PDF

Idries Shah 27 Books Collection : A Perfumed Scorpion, A Veiled Gazelle, Caravan of Dreams, Darkest England, Destination Mecca, Evenings with Idries Shah, Knowing How to Know, Learning How to Learn, Letters and Lectures of Idries Shah, Neglected aspects of Sufi study, Observations, Oriental Magic, Reflections, Seeker after Truth, Special Illumination, Special Problems in the study of Sufi ideas, Sufi thought and action, Tales of the Dervishes, The Dermis Probe, The Elephant in the Dark, The Englishman Handbook, Idries Shah Antology, The Magic Monastery, The natives are restless, wisdom of the Idiots PDF.

Idries Shah 27 Books Collection : A Perfumed Scorpion, A Veiled Gazelle, Caravan of Dreams, Darkest England, Destination Mecca, Evenings with Idries Shah, Knowing How to Know, Learning How to Learn, Letters and Lectures of Idries Shah, Neglected aspects of Sufi study, Observations, Oriental Magic, Reflections, Seeker after Truth, Special Illumination, Special Problems in the study of Sufi ideas, Sufi thought and action, Tales of the Dervishes, The Dermis Probe, The Elephant in the Dark, The Englishman Handbook, Idries Shah Antology, The Magic Monastery, The natives are restless, wisdom of the Idiots PDF.

2022 · PDF

The travels of Capts. Lewis and Clarke from St. Louis, by way of the Missouri and Columbia rivers, to the Pacific ocean; performed in the years 1804, 1805 & 1806, by order of the government of the United States. Containing delineations of the manners, customs, religion, &c. of the Indians, comp. from various authentic sources, and original documents, and a summary of the Statistical view of the Indian nations, from the official communication of Meriwether Lewis. Illustrated with a map of the country, inhabited by the western tribes of Indians

The travels of Capts. Lewis and Clarke from St. Louis, by way of the Missouri and Columbia rivers, to the Pacific ocean; performed in the years 1804, 1805 & 1806, by order of the government of the United States. Containing delineations of the manners, customs, religion, &c. of the Indians, comp. from various authentic sources, and original documents, and a summary of the Statistical view of the Indian nations, from the official communication of Meriwether Lewis. Illustrated with a map of the country, inhabited by the western tribes of Indians

1809 · PDF