Hands-On Mobile and Embedded Development
with Qt 5
Build apps for Android, iOS, and Raspberry Pi with
C++ and Qt
Lorn Potter
BIRMINGHAM - MUMBAI
Hands-On Mobile and Embedded Development with Qt 5
Copyright 2019 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
Commissioning Editor: Kunal Chaudhari
Acquisition Editor: Devanshi Doshi
Content Development Editor: Pranay Fereira
Technical Editor: Jane D'souza
Copy Editor: Safis Editing
Project Coordinator: Kinjal Bari
Proofreader: Safis Editing
Indexer: Manju Arasan
Graphics: Alishon Mendonsa
Production Coordinator: Jyoti Chauhan
First published: April 2019
Production reference: 1300419
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-78961-481-7
www.packtpub.com
To Qt, its founders, the developers who have worked on it, and its community of users.
mapt.io
Mapt is an online digital library that gives you full access to over 5,000 books and videos, as well as industry leading tools to help you plan your personal development and advance your career. For more information, please visit our website.
Why subscribe?
Spend less time learning and more time coding with practical eBooks and Videos from over 4,000 industry professionals
Improve your learning with Skill Plans built especially for you
Get a free eBook or video every month
Mapt is fully searchable
Copy and paste, print, and bookmark content
Packt.com
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.packt.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at customercare@packtpub.com for more details.
At www.packt.com , you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on Packt books and eBooks.
Foreword
During Easter 2019, I got a message from Lorn Potter, asking if I could write a foreword for his book about mobile and embedded development with Qt 5. I said, "sure, I'd be happy to," knowing what a skilled guy he is. Then he told me that the deadline was in a few hours. Challenge accepted!
I think he probably chose me because I've known him for a very long time, and maybe also because I am one of the two founders of Trolltech and also one of the first two Qt designers and developers.
Back in the stone ages, when Trolltech re-licensed Qt for Windows, to make it available for the development of open source software, we got an email from a guy called Lorn Potter. He wrote to us: "Trolltech, if you were a woman, I'd... I'd... Well, I'd take you out for dinner and a movie!". A bit later we worked on putting together some marketing material and someone thought it would be cool to use that quote. Marketing asked for permission to use the quote and contact with Lorn was established. Another story is that that quote created quite a controversy internally and was later removed.
Lorn was the creator of a desktop app called Gutenbrowser and quite a rock star in the open source community. When we needed a community liaison for our Qtopia product in mid-2003, Lorn was offered the job and took it. He then moved from the US to Brisbane, Australia, to work at our office there. Qtopia was basically a complete platform and application suite for mobile devices and was built with Qt.
Lorn was heavily involved with the open source developed version of Qtopia. Other duties he had at Trolltech included creating the Qtopia Greenphone SDK for our only hardware product, the Trolltech Greenphone:
He also ported Qtopia to run on other devices, such as Nokia's N770, N800, N900, Siemens SIMpad SL4, and Openmoko's Neo 1973 phone.
Lorn has decades of experience in using Qt for mobile and embedded development. Here is a picture of his collection of devices running Qt, just to give you an idea:
I haven't read this book, so I cannot guarantee its quality, but I can guarantee the quality of Lorn as a communicator and a very talented developer. You are in the best of hands.
Now read on and use Qt, my baby who has grown up to be a very powerful adult.
Eirik Chambe-Eng, Co-founder, Trolltech
Contributors
About the author
Lorn Potter is a software developer, specializing in Qt and QML on mobile and embedded devices with his company, llornkcor technologies. He has worked for Trolltech, Nokia, Canonical, and was a freelance contractor for Jolla, Intopalo, and the Qt Company. He is the official maintainer of Qt Sensors, for which he developed the QSensorGestures API. He maintains the unsupported QtSystemInfo for the open source Qt Project and also works on Qt Bearer Management and Qt for WebAssembly. He has written blogs and articles for the Linux Journal. He started his career in tech as Trolltech's Qtopia Community Liaison. He currently resides in Australia and spends his spare time recording electronic psybient music for the project Brog on his website.
About the reviewer
Mickael Minarie is a software developer who graduated from University of Clermont Ferrand with a BSc in embedded systems, and from Robert Gordon University with a BSc in computer science. He has worked freelance, developing some programs in C++/Qt for embedded systems and other programs related to photos and videos.
He lives now in France, but stayed for some years in the UK and Canada. He is enthusiastic about the techniques and history of photography and audio recording, and he now runs a YouTube channel discussing these subjects (in French only, for now). Mickael has also created some small projects for companies using Raspberry Pi and Qt in connection with photography.
Next page