Qt is everywhere these days. From your typical home computer to cloud servers, mobile phones, machine automation, coffee machines, medical devices, and embedded devices of all kinds, even in some of the classiest automobiles. It might even be somewhere in space, too! Even watches run Qt these days.
The Internet of Things (IoT) and home automation are big buzzwords that Qt is also a part of. As I like to say, there's no IoT without sensors! Would I write a book on Qt development without mentioning sensors? No. So, we will also dive into Qt Sensors as well.
There's no shortage of target devices these days, that's for sure. But in this book, we will only specifically target mobile phone platforms and Raspberry Pi to demonstrate some of the embedded features of Qt. Because Qt is cross-platform, you should still come away with knowledge on how to target coffee makers, too!
One consideration to make is which UI framework is going to be used. Using OpenGL is a viable option for mobile devices, especially if there is hardware support. I deliberately skip discussing OpenGL, as that is quite complicated and would be a complete book in itself. It is an option, however, and is available through the use of Qt frameworks.
This book is aimed at developers who are interested in developing cross-platform applications with Qt for use on mobile and embedded devices. Readers should have prior knowledge of C++ and be familiar, running commands from a command-line interface.
Chapter 1, Standard Qt Widgets, covers standard UI elements and dynamic layouts to teach the reader how to handle orientation changes.
Chapter 2, Fluid UI with Qt Quick, outlines standard QML elements, charts, data visualization, and animation.
Chapter 3, Graphical and Special Effects, looks at QML particles and graphical effects.
Chapter 4, Input and Touch, teaches the readers how to create and use virtual keyboards, and touch and voice input.
Chapter 5, Qt Network for Communication, talks the reader through network operations, sockets, and sessions.
Chapter 6, Connectivity with Qt Bluetooth LE, goes over Bluetooth LE device discovery, setting up a service, and manipulating characteristics.
Chapter 7, Machines Talking, discusses sensors, WebSockets, and MQTT automation.
Chapter 8, Where Am I? Location and Positioning, looks at GPS location, positioning, and maps.
Chapter 9, Sounds and Visions – Qt Multimedia, covers 3D audio, FM radio, and recording and playing video.
Chapter 10, Remote Databases with Qt SQL, outlines, remote use of SQLite and MySQL databases.
Chapter 11, Enabling In-App Purchases with Qt Purchasing, discusses adding in-app purchases to your apps.
Chapter 12, Cross Compiling and Remote Debugging, looks at cross-compiling, and connecting to and debugging on a remote device.
Chapter 13, Deploying to Mobile and Embedded, examines the setting up of an application and completion of app store procedures.
Chapter 14, Universal Platform for Mobiles and Embedded Devices, looks at running Qt apps in a web browser.
Chapter 15, Building a Linux System, covers setting up and building a complete Linux embedded system.
This book assumes you have used C++, are familiar with QML, can use Git to download source code, and can type commands into a command-line interface. You should also be accustomed to using GDB debugger.
It also assumes you have a mobile or embedded device, such as a phone or Raspberry Pi.
You can download the example code files for this book from your account at www.packt.com. If you purchased this book elsewhere, you can visit www.packt.com/support and register to have the files emailed directly to you.
You can download the code files by following these steps:
- Log in or register at www.packt.com.
- Select the
SUPPORT
tab. - Click on
Code Downloads & Errata
. - Enter the name of the book in the
Search
box and follow the onscreen instructions.
Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:
- WinRAR/7-Zip for Windows
- Zipeg/iZip/UnRarX for Mac
- 7-Zip/PeaZip for Linux
The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Hands-On-Mobile-and-Embedded-Development-with-Qt-5/tree/master. In case there's an update to the code, it will be updated on the existing GitHub repository.
We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!
We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here: https://www.packtpub.com/sites/default/files/downloads/9781789614817_ColorImages.pdf.
There are a number of text conventions used throughout this book.
CodeInText
: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "On iOS, you need to edit the plist.info
file."
A block of code is set as follows:
if (!QTouchScreen::devices().isEmpty()) { qApp->setStyleSheet("QButton {padding: 10px;}"); }
Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "Select the Projects
icon on the left side of Qt Creator
, then pick which target platform you want like Qt 5.12.0
for iOS
"
Feedback from our readers is always welcome.
General feedback: If you have questions about any aspect of this book, mention the book title in the subject of your message and email us at [email protected]
.
Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packt.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details.
Piracy: If you come across any illegal copies of our works in any form on the Internet, we would be grateful if you would provide us with the location address or website name. Please contact us at [email protected]
with a link to the material.
If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.
Please leave a review. Once you have read and used this book, why not leave a review on the site that you purchased it from? Potential readers can then see and use your unbiased opinion to make purchase decisions, we at Packt can understand what you think about our products, and our authors can see your feedback on their book. Thank you!
For more information about Packt, please visit packt.com.