Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Hands-On GUI Programming with C++ and Qt5
Hands-On GUI Programming with C++ and Qt5

Hands-On GUI Programming with C++ and Qt5: Build stunning cross-platform applications and widgets with the most powerful GUI framework

eBook
€8.99 €29.99
Paperback
€36.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

Hands-On GUI Programming with C++ and Qt5

Introduction to Qt

Qt (pronounced cute) has been used by software engineers and developers for more than two decades to create cross-platform applications since its first release. After several changes of ownership and numerous major code overhauls, Qt has become even more feature rich and supports even more platforms than it used to. Qt not only excels in desktop application development, but is also excellent for both mobile and embedded systems development.

In this chapter, we will cover the following topics :

  • 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.

There are two types of license for Qt:

  • The first type is the Open Source License, which is free of charge, but only if your project/product fits their terms and conditions. For example, if you made any changes to the Qt's source code, it is an obligation for you to submit back those changes to Qt developers. Failure to do so could result in serious legal issues, and therefore, you might want to pick the second option instead.
  • The second type of license is the Commercial License, which gives you full rights to proprietary Qt source code modifications and keeps your application private. But of course, these privileges come with a set of fees.

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.

For more information regarding Qt's licensing, please visit https://www.qt.io/licensing-comparison.

Why use Qt?

It's not hard to see why Qt stands a chance of winning against all other existing SDKs out there in the market; first of all, cross-platform compatibility. You can hardly find any other development kits that support so many platforms without writing different sets of code for each platform. By eliminating these extra steps, programmers can just focus on developing their applications without the need to worry about the implementation of each and every platform-specific feature. Furthermore, your code will look clean without all the #ifdef macros and having to load different dependencies for different platforms.

Qt generally uses C++, which is a compiled language that generates small and efficient code. It is also well documented and follows a very consistent set of naming conventions, which reduces the learning curve for the developer.

Do be aware that Qt does include a small amount of features that only work on specific platforms. However, these are minimal and often for special use cases, such as Qt Sensors, which only work on mobile platforms; Qt Web Engine, which only works on desktops; Qt NFC, only for Android and Linux; and so on. Those are some very specific functionalities that only exist on certain platforms that support them. Other than that, common features are usually supported on all platforms.

Discovering tools in Qt

Qt comes with a set of tools that make programmers' lives easier. One of the tools is Qt Creator (seen in the following screenshot), which is an IDE (integrated development environment) that consists of a code editor and a GUI (graphical user interface) designer that works hand-in-hand with other Qt tools, such as the compiler, debugger, and so on. The most attractive tool among all is, of course, the GUI designer, which comes with two different types of editors: one for widget-based applications, called Qt Designer, and another for Qt Quick Application, called Qt Quick Designer. Both tools can be accessed directly in Qt Creator when you open up a relevant file format. Qt Creator also includes a built-in documentation viewer called Qt Assistant. It is really handy since you can look for the explanation about a certain Qt class or function by simply hovering the mouse cursor over the class name in your source code, and pressing the F1 key. Qt Assistant will then be opened and show you the documentation related to the Qt class or function:

Qt Designer

Qt Designer is normally used by developers to design GUIs for desktop applications, while Qt Quick Designer is usually used for mobile and embedded platforms. With that being said, both formats run just fine on both desktop and mobile formats, the only difference is the look and feel, and the types of languages used.

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.

If you're doing a simple program using Qt Quick, you don't have to touch any C++ coding at all. That's especially welcoming for web developers because they can immediately pick up Qt Quick and develop their own application without a steep learning curve; everything is just so familiar to them. For much more complex software, you can even link C++ functions from QML, and vice versa. Again, if you're interested in learning more about Qt Quick and QML, please head over to Chapter 14, QtQuick and QML.

Since Qt Creator is also written in Qt libraries itself, it is also totally cross-platform. Hence, you can use the same set of tools across different development environments and develop a unified workflow for your team, resulting in better efficiency and cost-effectiveness.

Other than that, Qt comes with many different modules and plugins, which cover a wide range of functionality you need for your projects. There is often no need for you to look for other external libraries or dependencies and try and implement them yourself. The abstraction layer of Qt makes the backend implementation invisible to the users and results in a unified coding style and syntax. If you try to put together a bunch of external dependencies yourself, what you'll find is each library has its own distinctive coding style. It's quite a mess when mixing up all the different coding styles in the same project, unless you make your own abstraction layer, which is a very time-consuming task. Since Qt already includes most, if not all the modules that you need to create feature-rich applications, there is no need for you to implement your own.

For more information regarding the modules that come with Qt, please visit: http://doc.qt.io/qt-5/qtmodules.html.

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.

You might wonder why the installer is so small in size—it is only around 19 MB. This is because the unified online installer doesn't actually contain any of the Qt packages, but is rather a downloader client which helps you to download all the relevant files and install them to your computer once the download has completed. Once you have downloaded the online installer, double-click on it and you will be presented with an interface like this (the following example is running on a Windows system):

Click the Next button, and a DRM (Digital Rights Management) page will appear and ask you to log in with your Qt account. If you don't have one, you can also create your account on the same page:

Once you have logged in, you will see a message that says No valid commercial license available in your Qt Account for this host platform. Don't worry about that, just click the Next button to proceed.

Next, you will be asked to specify the installation path. The default path is usually just fine, but you can change it to any other path as you please. Also, you can either leave the Associate this common file types with Qt Creator option checked, or uncheck it manually if otherwise.

After that, you will be presented with a series of checkboxes with which you can select the version(s) of Qt you need to install to your computer. Typically, for new users, the default options are sufficient. If you don't need some of the options, such as support for Qt on Android, you can unselect them here to reduce the size of the download. You can always go back and add or remove Qt components later if needed, using the Maintenance Tool:

Next, you will be presented with the license agreement. Check the first option, which says I have read and agree to the terms contained in the license agreements, and click the Next button. Make sure you do read the terms and conditions stated in the license agreement!

Finally, the installer will ask you to enter a name to create a start menu shortcut for Qt. Once you're done, just click Next and then click Install. The download process will take a couple of minutes to a couple of hours, depending on your internet speed. Once all the files have been downloaded, the installer will automatically proceed to install the files to the installation path that you have just set in one of the previous steps.

Setting up the working environment

Since you have installed the latest version of Qt, let's fire up Qt Creator and start messing around by creating our first project! You should be able to find Qt Creator's shortcut icon either on your desktop or somewhere within your start menu.

Let's look at the steps to set up our environment:

  1. When you first start Qt Creator, you should see the following interface:
  1. Before you start creating your first project, there are several settings that you might want to tweak. Go to the top menu and select Tools | Options. A window that looks something like this will pop up on the screen:
  1. There are quite a number of different categories available on the left of the window. Each category represents a set of options you can set to customize how Qt Creator will look and operate. You may not want to touch the settings at all, but it's good to learn about them first. One of the first settings you might want to change is the Language option, which is available in the Environment category. Qt Creator provides us with an option to switch between different languages. Although it doesn't support all languages, most of the popular ones are available, such as English, French, German, Japanese, Chinese, Russian, and so on. Once you have selected your desired language, click Apply and restart Qt Creator. You must restart Qt Creator in order to see the changes.
  1. The next setting you probably need is the setting for indentation. By default, Qt uses space indentation, in which four spaces will be added to your script whenever you press the Tab key on your keyboard. Some people, like me, prefer tab indentation instead. You can change the indentation setting at C++ category.
Do note that if you are contributing to Qt project's source code, it's required that you use space indentation instead of tabs, which is the coding standard and style of the Qt project.
  1. Under the C++ category, you can find a Copy button located beside the Edit button, somewhere in the top right position. Click it and a new window will pop up.
  2. Insert a code style name of your own, as you can't edit the default built-in coding style. After you have created your own settings, click the Edit button. You can now see the actual Tabs And Indentation settings under the General tab:
  1. Do note that even though there is a Tabs And Indentation setting located at the Text Editor category, I believe it's an old setting that no longer has any effect in Qt Creator. There is also a note written on the UI that says Code indentation is configured in C++ and Qt Quick settings. A possible reason for this is that since Qt Creator now supports both C++ project and QML projects, Qt developers probably felt there was a need to separate the settings into two, so therefore the old setting is no longer valid. I'm pretty sure this section on Text Editor will be deprecated in the near future.
  1. Next, under the Build and Run category, you'll see a tab labeled Kits.
  1. This is where you can set the compile settings for each platform. As you can see from the next screenshot, my Qt does not support desktop build under MSVC (Microsoft Visual Studio Compiler) because I never installed Visual Studio on my computer. Instead, my Qt only supports desktop build under the MinGW (Minimal GNU for Windows) compiler. From this window, you can check and see if your Qt supports the platform and compiler you wanted for your project and make changes to it if necessary. But for now, we'll just leave it as it is. To learn more about what is a kit is and how to configure the build settings, please head over to Chapter 15, Cross-Platform Development:
  1. Finally, we can link our project to our version control server at the Version Control category.
  2. Version control allows you or your team to submit code changes to a centralized system so that each and every team member can obtain the same code without passing files around manually. When you're working in a big team, it's very difficult to manually keep track of the code changes, and even more so to merge the code done by different programmers. Version control systems are designed to solve these issues. Qt supports different types of version control systems, such as Git, SVN, Mercurial, Perforce, and so on. Although this is a very useful feature, especially if you're working in a team, we don't need to configure it for now:

Running our first Hello World Qt program

A Hello World program is a very simple program that does nothing more than display an output that says Hello, World! (or any other thing, not necessarily this) to show that the SDK is working properly. We don't need to write very long code to produce a Hello World program, we can do it using only the very minimum and the most basic code. In fact, we don't have to write any code in Qt, as it will generate the code when you first create your project!

Let's begin our project by following these steps:

  1. To create a new project in Qt, click the New Project button located at the welcome screen on your Qt Creator. Alternatively, you can also go to the top menu and select File | New File or Project.
  1. After that, you will be presented with a window which lets you select a template for your project or file. For this demonstration, we will pick Qt Widgets Application:
  1. After that, set your project name and project directory. You can also check the checkbox that says Use as default project location so that you can automatically get the same path when you create a new project in Qt next time.
  1. Next, Qt Creator will ask you to select one or more kits for your project. For this demonstration, we'll pick Desktop Qt with the MinGW compiler. Don't worry, as you are allowed to add or remove kits from your project later on during development:
  1. After that, you will be presented with a page that says Class Information. This is basically where you set the class name for your base window, but we're not going to change anything, so just click the Next button to proceed:
  1. Finally, it will ask you to link your project to your version control server. If you have not added any to Qt before, you can click the Configure button, which will bring you to the settings dialog that I showed you in the previous section of this chapter.
  2. For this demonstration, however, we'll keep the settings as <None> and press the Finish button. Qt Creator will then proceed to generate the necessary files for your project. After a second or two, Qt Creator will automatically switch to Edit mode and you should be able to see the files it created for you under the Project panel. You can open up any of the files by double-clicking on them in Qt Creator and they will be shown in the editor located on the right-hand side:
  1. Before we start compiling the project, let's open up the mainwindow.ui file under the Forms directory in your project panel. Don't worry too much about the user interface as we will cover it in the following chapter. What we need to do is to click and drag the Label icon under the Display Widgets category to the center of the window on the right, as shown in the following screenshot:
  1. After that, double-click on the Text Label widget and change the text to Hello World!. Once you're done, hit the Enter button on your keyboard:
  1. The final step is to press the Run button located at the bottom left corner that looks like this:
  1. We would normally build the program first and then run the program, but Qt Creator is smart enough to figure out that it needs to build it. However, it is still a good habit to build and run your application separately. After a few seconds of compiling, ... voila! You have created your first Hello World program using Qt!:

Summary

The existence of tools such as Qt Creator has made designing applications' user interfaces an easy and fun job for the developers. We no longer need to write a bunch of code just to create a single button, or change a bunch just to adjust the position of a text label, since Qt Designer will generate that code for us when we design our GUI. Qt has applied the WYSIWYG (what you see is what you get) philosophy into the working pipeline and it provides us with all the convenience and efficiency we need to get our jobs done.

In the next chapter, we will learn the ins and outs of Qt Creator and start designing our first GUI with Qt!

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • • Explore Qt 5’s powerful features to easily design your GUI application
  • • Leverage Qt 5 to build attractive cross-platform applications
  • • Work with Qt modules for multimedia, networking, and location, to customize your Qt applications

Description

Qt 5, the latest version of Qt, enables you to develop applications with complex user interfaces for multiple targets. It provides you with faster and smarter ways to create modern UIs and applications for multiple platforms. This book will teach you to design and build graphical user interfaces that are functional, appealing, and user-friendly. In the initial part of the book, you will learn what Qt 5 is and what you can do with it. You will explore the Qt Designer, discover the different types of widgets generally used in Qt 5, and then connect your application to the database to perform dynamic operations. Next, you will be introduced to Qt 5 chart which allows you to easily render different types of graphs and charts and incorporate List View Widgets in your application. You will also work with various Qt modules, like QtLocation, QtWebEngine, and the networking module through the course of the book. Finally, we will focus on cross-platform development with QT 5 that enables you to code once and run it everywhere, including mobile platforms. 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 is this book 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 you will learn

  • • Implement tools provided by Qt 5 to design a beautiful GUI
  • • Understand different types of graphs and charts supported by Qt 5
  • • Create a web browser using the Qt 5 WebEngine module and web view widget
  • • Connect to the MySQL database and display data obtained from it onto the Qt 5 GUI
  • • Incorporate the Qt 5 multimedia and networking module in your application
  • • Develop Google Map-like applications using Qt 5's location module
  • • Discover cross-platform development by exporting the Qt 5 application to different platforms
  • • Uncover the secrets behind debugging Qt 5 and C++ applications
Estimated delivery fee Deliver to Malta

Premium delivery 7 - 10 business days

€32.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Apr 27, 2018
Length: 404 pages
Edition : 1st
Language : English
ISBN-13 : 9781788397827
Category :
Languages :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Malta

Premium delivery 7 - 10 business days

€32.95
(Includes tracking information)

Product Details

Publication date : Apr 27, 2018
Length: 404 pages
Edition : 1st
Language : English
ISBN-13 : 9781788397827
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 115.97
Hands-On GUI Programming with C++ and Qt5
€36.99
Game Programming using Qt 5 Beginner's Guide
€41.99
Learn Qt 5
€36.99
Total 115.97 Stars icon
Banner background image

Table of Contents

17 Chapters
Introduction to Qt Chevron down icon Chevron up icon
Qt Widgets and Style Sheets Chevron down icon Chevron up icon
Database Connection Chevron down icon Chevron up icon
Graphs and Charts Chevron down icon Chevron up icon
Item Views and Dialogs Chevron down icon Chevron up icon
Integrating Web Content Chevron down icon Chevron up icon
Map Viewer Chevron down icon Chevron up icon
Graphics View Chevron down icon Chevron up icon
The Camera Module Chevron down icon Chevron up icon
Instant Messaging Chevron down icon Chevron up icon
Implementing a Graphics Editor Chevron down icon Chevron up icon
Cloud Storage Chevron down icon Chevron up icon
Multimedia Viewers Chevron down icon Chevron up icon
Qt Quick and QML Chevron down icon Chevron up icon
Cross-Platform Development Chevron down icon Chevron up icon
Testing and Debugging Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
(8 Ratings)
5 star 12.5%
4 star 37.5%
3 star 12.5%
2 star 12.5%
1 star 25%
Filter icon Filter
Top Reviews

Filter reviews by




Istvan Dec 24, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
IT is correct
Amazon Verified review Amazon
Amine Aug 25, 2021
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Contains interesting Qt code snippets.
Amazon Verified review Amazon
Ersin Söbütay Oct 31, 2018
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Passt
Amazon Verified review Amazon
Donato Bolzani Jul 14, 2021
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
É um livro básico, para iniciantes.Consegui alcançar alguns objetivos através de seu conteúdo.Entretanto, apresenta algumas falhas. Começo a imaginar que a Editora não seja muito exigente quanto à correspondência entre o conteúdo do livro e os códigos de exemplo - indicados no próprio livro - baixados do site da editora.Já havia percebido essas diferenças em outros títulos.
Amazon Verified review Amazon
Birdski Nov 15, 2018
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
Lots of errors in this book. It makes it hard to follow some chapters.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela