Getting Started with Qt 5
Introduction to programming Qt 5 for cross-platform application development
Benjamin Baka
BIRMINGHAM - MUMBAI
Getting Started 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: Pavan Ramchandani
Acquisition Editor: Siddharth Mandal
Content Development Editor: Mohammed Yusuf Imaratwale
Technical Editor: Surabhi Kulkarni
Copy Editor: Safis Editing
Project Coordinator: Pragati Shukla
Proofreader: Safis Editing
Indexer: Tejal Daruwale Soni
Graphics: Alishon Mendonsa
Production Coordinator: Jisha Chirayil
First published: February 2019
Production reference: 1280219
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-78995-603-0
www.packtpub.com
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.
Contributors
About the author
Benjamin Baka is a full-stack software developer and is passionate about cutting-edge technologies and elegant programming techniques. He has 10 years in different technologies, from C++, Java, Ruby, Python to Qt. Some of the projects he's working on can be found on his GitHub page. He is currently working on exciting technologies all from the camp of mPedigree Network.
I'd like to thank the Baka family for all of their support in my many endeavors. Another thanks to Samuel Afari for encouraging me to go beyond my limits.
To the entire Packt team, it's been a pleasure working with you.
And I continue to stay forever indebted to Guido Sohne and Lorenzo Cabrini for their amazing guidance and input in my life.
About the reviewer
Nibedit Dey is a techno-entrepreneur and innovator with over 8 years of experience in
building complex software-based products using Qt and C++. Before starting his
entrepreneurial journey, he worked for L&T and Tektronix in different research and
development roles. Additionally, he has reviewed The Modern C++ Challenge, Hands-on GUI programming with C++ and Qt5, and Hands-On High Performance Programming with Qt 5books for Packt.
I would like to thank the online programming communities, bloggers, and my peers from
earlier organizations, from whom I have learned a lot over the years.
Packt is searching for authors like you
If you're interested in becoming an author for Packt, please visit authors.packtpub.com and apply today. We have worked with thousands of developers and tech professionals, just like you, to help them share their insight with the global tech community. You can make a general application, apply for a specific hot topic that we are recruiting an author for, or submit your own idea.
Preface
There are many buzzwords in computing today, most of which revolve around various software technologies and concepts. Browsers have become the preferred means of accessing information and consuming all manner of data. But there is still a void that can only be filled by standalone applications that must be installed and run on an operating system. The browser itself as an application cannot be accessed through a browser and bears witness to this assertion.
Applications such as VLC, Adobe Photoshop, Google Earth, and QGIS are a few examples of applications that run directly on an operating system. Interestingly enough, these well-known software brands are built with Qt.
Qt (pronounced "cute") is a cross-platform application framework and widget toolkit that is used in creating graphical user interface applications that run on a number of different hardware and operating systems. The aforementioned applications were written using this same toolkit.
The main aim of this book is to introduce Qt to the reader. Through the use of simple and easy-to-understand examples, it will walk the user from one concept to the next without focusing too much on theory. The size of the book requires us to be concise in our presentation of materials. Coupled with the ample examples presented, we hope to shorten the path to understanding and learning how to use Qt.
Who this book is for
Anyone looking to embark on the development of graphical user interface applications will find this book useful. No prior exposure to other toolkits is required in order to understand this book. However, having such skills will prove useful.
The book does, however, presume that you have a working knowledge in the use of C++. If you can express your thoughts in developing algorithms and the use of object-oriented programming, you will find the content easy to consume.
Expert or intermediate persons with Qt knowledge should seek more detailed materials that are available out there. This book is not a reference guide, and should only be used as introductory material.
What this book covers
Next page