(Ebook) Hands-On GUI Programming with C++ and Qt5: Build stunning cross-platform applications and widgets with the most powerful GUI framework by Eng, Lee Zhi ISBN 9781788393744, 1788393740 download pdf
(Ebook) Hands-On GUI Programming with C++ and Qt5: Build stunning cross-platform applications and widgets with the most powerful GUI framework by Eng, Lee Zhi ISBN 9781788393744, 1788393740 download pdf
com
OR CLICK HERE
DOWLOAD EBOOK
ebooknice.com
https://ebooknice.com/product/create-gui-applications-with-python-
qt5-22683090
ebooknice.com
https://ebooknice.com/product/create-gui-applications-with-python-
qt5-pyside2-edition-11547142
ebooknice.com
(Ebook) Mastering Qt 5: Create stunning cross-platform
applications using C++ with Qt Widgets and QML with Qt
Quick, 2nd Edition by Guillaume Lazar & Robin Penea ISBN
B07DH9YK9Q
https://ebooknice.com/product/mastering-qt-5-create-stunning-cross-
platform-applications-using-c-with-qt-widgets-and-qml-with-qt-
quick-2nd-edition-55497936
ebooknice.com
ebooknice.com
ebooknice.com
Hands-On GUI Programming with C++ and Qt5
BIRMINGHAM - MUMBAI
Hands-On GUI Programming
with C++ and Qt5
Copyright © 2018 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.
ISBN 978-1-78839-782-7
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
1. Introduction to Qt
What is Qt?
Why use Qt?
Discovering tools in Qt
Qt Designer
Qt Quick Designer
Downloading and installing Qt
Setting up the working environment
Running our first Hello World Qt program
Summary
3. Database Connection
Introducing the MySQL database system
Setting up the MySQL database
SQL commands
SELECT
INSERT
UPDATE
DELETE
JOIN
Database connection in Qt
Creating our functional login page
Summary
7. Map Viewer
Map display
Setting up the Qt location module
Creating a map display
Marker and shape display
Displaying position markers on a map
Displaying shapes on a map
Obtaining a user's location
Geo Routing Request
Summary
8. Graphics View
Graphics View framework
Setting up a new project
Movable graphics items
Creating an organization chart
Summary
By the end of this book, you will have successfully learned about
high-end GUI applications and will be capable of building many more
powerful, cross-platform applications.
Who this book is for
This book will appeal to developers and programmers who would like
to build GUI-based applications. Basic knowledge of C++ is
necessary, and the basics of Qt would be helpful.
What this book covers
Chapter 1, Introduction to Qt, will give you a tour of Qt. In this
book, you'll download the SDK, install Qt, and, most importantly,
install Qt Creator, which is used as both the user interface designer
and the IDE for writing and compiling C++ scripts.
Chapter 12, Cloud Storage, will teach you how to upload different
types of files to the FTP server and display them in a list. The user
will be able to download the file and open them with different types
of viewers depending on its file format.
Chapter 14, Qt Quick and QML, will introduce you to the basics of
QML scripting, which is one of the most recent trends in the Qt
world.
Chapter 16, Testing and Debugging, will teach you the essentials
of how to use various techniques to test and debug your Qt
application.
To get the most out of this
book
In order to successfully execute all the codes and instructions in this
book, you would need the following:
A basic PC/Laptop
A working internet connection
Qt 5.10
MariaDB 10.2 (or MySQL Connector)
Filezilla Server 0.9
Once the file is downloaded, please make sure that you unzip or
extract the folder using the latest version of:
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.
What is Qt?
Why use Qt?
Using tools in Qt
Downloading and installing Qt
Setting up a working environment
Running our first Hello World Qt program
Throughout this chapter, we will learn more about the history of Qt.
Then, we'll proceed to build our first example program using the
latest version of Qt, which is Qt version 5. For the convenience of
our readers, we will simply refer to it as Qt throughout the book.
What is Qt?
Currently, the latest version of Qt (as this book is being written) is
version 5.10. This version incorporated a lot of new features as well
as thousands of bug fixes, which makes Qt a really powerful and
stable development kit for software developers and system
engineers alike. Qt has a huge package of SDK (software
development kit) that contains a wide range of tools and libraries for
helping developers get their job done without worrying too much
about technical issues related to a specific platform. Qt handles all
the messy integration and compatibility issues for you behind the
curtain so you don't have to deal with them. This will not only
improve efficiency but also reduces development costs, especially
when you're trying to develop cross-platform applications that cater
to a wider range of users.
If you're just starting to learn Qt, don't get pushed back by these
terms, as you're certainly not going to modify the source code of Qt
libraries or recompile it from source anyway, at least not now.
The GUI file saved by Qt Designer carries the .ui extension, which
is saved in XML format. The file stores the attributes of each and
every widget placed by the GUI designer, such as position, size,
margin, tooltip, layout direction, and so on. It also saves the signal-
and-slot event names within itself for easily connecting with the
code in the later stages. This format does not support coding and
only works for Qt C++ projects, namely widget-based application
projects.
Qt Quick Designer
On the other hand, Qt Quick Designer saves GUI files in both
.ui.qml and .qml formats. Qt Quick is a very different type of
GUI system in terms of technological concept and development
approach, which we will cover in Chapter 14, Qt Quick and QML.
Instead of XML format, Qt Quick Designer saves its data in a
declarative language similar to JavaScript called QML. QML not only
allows the designer to customize their GUI in a CSS-like (Cascading
Style Sheets) fashion, it also allows the programmer to write
functional JavaScript within the QML file. As we mentioned earlier,
.ui.qml is the file format used for visual decoration only while
.qml contains application logic.
That being said, there are also many third libraries out there that
extend Qt for features that Qt itself does not support, such as
libraries that focus on game development or any other features that
are designed for the specific user group.
Downloading and installing Qt
Without wasting any time, let's begin with our installation! To get the
free installer for Open Source Qt, first go to their website at
https://www.qt.io. There, look for the button that says
Download Qt (the website might look different if they have updated
it). Do note that you might be downloading the free trial version for
the Commercial Qt, which you cannot use after 30 days. Make sure
that you are downloading the open source version of Qt instead.
Also, you may want to pick the right installer for your platform, since
there are many different installers of Qt for different operating
systemsWindows, macOS, and Linux.
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebooknice.com