Book description
An In-depth guide updated with the latest version of Qt 5.11 including new features such as Quick Controls and Qt Gamepad
Key Features
- Unleash the power of Qt 5.11 with C++
- Build applications using Qt Widgets (C++) or Qt Quick (QML)
- Create cross-platform applications for mobile and desktop platforms with Qt 5
Book Description
Qt 5.11 is an app development framework that provides a great user experience and develops full capability applications with Qt Widgets, QML, and even Qt 3D. Whether you're building GUI prototypes or fully-fledged cross-platform GUI applications with a native look and feel, Mastering Qt 5 is your fastest, easiest, and most powerful solution. This book addresses various challenges and teaches you to successfully develop cross-platform applications using the Qt framework, with the help of well-organized projects.
Working through this book, you will gain a better understanding of the Qt framework, as well as the tools required to resolve serious issues, such as linking, debugging, and multithreading. You'll start off your journey by discovering the new Qt 5.11 features, soon followed by exploring different platforms and learning to tame them. In addition to this, you'll interact with a gamepad using Qt Gamepad. Each chapter is a logical step for you to complete in order to master Qt.
By the end of this book, you'll have created an application that has been tested and is ready to be shipped.
What you will learn
- Create stunning UIs with Qt Widgets and Qt Quick 2
- Develop powerful, cross-platform applications with the Qt framework
- Design GUIs with the Qt Designer and build a library in it for UI previews
- Handle user interaction with the Qt signal or slot mechanism in C++
- Prepare a cross-platform project to host a third-party library
- Use the Qt Animation framework to display stunning effects
- Deploy mobile apps with Qt and embedded platforms
- Interact with a gamepad using Qt Gamepad
Who this book is for
Mastering Qt 5 is for developers and programmers who want to build GUI-based applications. C++ knowledge is necessary, and knowing QT basics will help you get the most out of this book.
Publisher resources
Table of contents
- Title Page
- Copyright and Credits
- Dedication
- Packt Upsell
- Contributors
- Preface
- Get Your Qt Feet Wet
- Discovering qmake Secrets
- Dividing Your Project and Ruling Your Code
- Conquering the Desktop UI
-
Dominating the Mobile UI
- Starting with Qt Quick and QML
- Checking your development environment
- Creating a Qt Quick project
- Preparing your Qt Quick gallery entry point
- Displaying albums with ListView
- Theming the application with a QML singleton
- Loading a database on mobile devices
- Creating a new album from a custom InputDialog
- Loading images with an ImageProvider
- Displaying thumbnails in GridView
- Swiping through full resolution images
- Summary
-
Even Qt Deserves a Slice of Raspberry Pi
- Discovering Qt3D
- Configuring Qt for your Raspberry Pi
- Creating an entry point for your Qt3D code
- Setting up the scene
- Assembling your Qt3D entities
- Preparing the board game
- Crafting entities from the factory
- Building a snake engine in JavaScript
- Varying the HUD with QML states
- Profiling your QML application
- Summary
-
Third-Party Libraries without a Headache
- Creating your Qt Designer plugin
- Configuring the project for Windows
- Configuring the project for Linux
- Configuring the project for Mac
- Implementing your OpenCV filters
- Designing the UI with FilterWidget
- Exposing your plugin to Qt Designer
- Using your Qt Designer plugin
- Building the image-filter application
- Summary
- Animations - Its Alive, Alive!
- Keeping Your Sanity with Multithreading
- Need IPC? Get Your Minions to Work
-
Having Fun with Multimedia and Serialization
- Architecting the drum machine project
- Creating a drum track
- Making your objects serializable with QVariant
- Serializing objects in JSON format
- Serializing objects in XML format
- Serializing objects in binary format
- Playing low-latency sounds with QSoundEffect
- Triggering a QButton with your keyboard
- Bringing PlaybackWorker to life
- Accepting mouse drag-and-drop events
- Summary
- You Shall (Not) Pass with QTest
- All Packed and Ready to Deploy
-
Qt Hat Tips and Tricks
- Managing your workspace with sessions
- Searching with the Locator
- Increasing the compilation speed
- Examining memory with Qt Creator
- Generating random numbers
- Silencing unused variable warnings
- Logging custom objects to QDebug
- Improving log messages
- Saving your logs to a file
- Generating a command-line interface
- Sending and receiving HTTP data
- Playing with Qt Gamepad
- Styling QML with Qt Quick Controls 2
- Summary
- Other Books You May Enjoy
Product information
- Title: Mastering Qt 5
- Author(s):
- Release date: August 2018
- Publisher(s): Packt Publishing
- ISBN: 9781788995399
You might also like
book
Beginning PyQt: A Hands-on Approach to GUI Programming with PyQt6
Learn GUI application development from the ground up by building simple projects that teach the fundamentals …
book
Tidy First?
Messy code is a nuisance. "Tidying" code, to make it more readable, requires breaking it up …
book
Refactoring: Improving the Design of Existing Code
Fully Revised and Updated–Includes New Refactorings and Code Examples “Any fool can write code that a …
book
Principles of Logo Design
From noted graphic designer and logo expert George Bokhua, Principles of Logo Design presents essential techniques …