▶Book Description
PyQt is one of the best cross-platform interface toolkits currently available; it's stable, mature, and completely native. If you want control over all aspects of UI elements, PyQt is what you need. This book will guide you through every concept necessary to create fully functional GUI applications using PyQt, with only a few lines of code.
As you expand your GUI using more widgets, you will cover networks, databases, and graphical libraries that greatly enhance its functionality. Next, the book guides you in using Qt Designer to design user interfaces and implementing and testing dialogs, events, the clipboard, and drag and drop functionality to customize your GUI. You will learn a variety of topics, such as look and feel customization, GUI animation, graphics rendering, implementing Google Maps, and more. Lastly, the book takes you through how Qt5 can help you to create cross-platform apps that are compatible with Android and iOS. You will be able to develop functional and appealing software using PyQt through interesting and fun recipes that will expand your knowledge of GUIs
▶What You Will Learn
⦁ Use basic Qt components, such as a radio button, combo box, and sliders
⦁ Use QSpinBox and sliders to handle different signals generated on mouse clicks
⦁ Work with different Qt layouts to meet user interface requirements
⦁ Create custom widgets and set up customizations in your GUI
⦁ Perform asynchronous I/O operations and thread handling in the Python GUI
⦁ Employ network concepts, internet browsing, and Google Maps in UI
⦁ Use graphics rendering and implement animation in your GUI
⦁ Make your GUI application compatible with Android and iOS devices
▶Key Features
⦁ Get succinct QT solutions to pressing GUI programming problems in Python
⦁ Learn how to effectively implement reactive programming
⦁ Build customized applications that are robust and reliable
▶Who This Book Is For
This book is meant for intermediate to advanced programmers and developers who have some preliminary knowledge of Python programming. This book can be of great use for trainers, teachers, and software developers who wish to build a fully-featured GUI-based application in Python.
▶What this book covers
⦁ Chapter 1, Creating a User Interface with Qt Components, teaches readers to use certain basic widgets of Qt Designer and how to display a welcome message along with the username. You will also be learning how to choose one out of several options using radio buttons and choose more than one out of several options by making use of checkboxes.
⦁ Chapter 2, Event Handling –. Signals and Slots, covers how to execute specific tasks on the occurrence of certain events on any widget, how to copy and paste text from one Line Edit widget to another, convert data types and make a small calculator, and use spin boxes, scrollbars, and sliders. You will also learn to perform multiple tasks using the List Widget.
⦁ Chapter 3, Working with Date and Time, focuses on learning how to display the system clock time using an LCD, show the date selected by the user from Calendar Widget, create a hotel reservation form, and display tabular data using Table widget.
⦁ Chapter 4, Understanding OOP Concepts, discusses object-oriented programming concepts such as how to use classes, single inheritance, multilevel inheritance in GUI applications, and multiple inheritance.
⦁ Chapter 5, Understanding Dialogs, explores the use of certain dialogs, where each dialog is meant for fetching a different kind of information. You will also learn to take input from the user using input dialog.
⦁ Chapter 6, Understanding Layouts, explains how to arrange widgets horizontally, vertically, and in different layouts by making use of Horizontal Layout, Vertical Layout, Grid Layout, and arranging widgets in two column layout using Form Layout.
⦁ Chapter 7, Networking and Managing Large Documents, demonstrates how to make a small browser, establish a connection between client and server, create a dockable and floatable sign in form, and manage more than one document using MDI. Also, you will be learn how to display information in sections using the Tab widget. You will learn how to create a custom menu bar that invokes different graphics tools when a specific menu item is chosen.
⦁ Chapter 8, Doing Asynchronous Programming in Python, looks at the concept of asynchronous operations using threads. To see the impact of asynchronous operations on GUIs, you will be making use of a progress bar, that is, the progress bars will be updated through threads asynchronously.
⦁ Chapter 9, Database Handling, outlines how to manage a SQLite database to keep information for future use. Using the knowledge gained, you will learn to make a signin form that checks whether a user's email address and password are correct or not.
⦁ Chapter 10, Using Graphics, explains how to display certain graphics in the application. You will also learn how to create a toolbar of your own that contains certain tools that can be used to draw different graphics.
⦁ Chapter 11, Implementing Animation, features how to display a 2D graphical image, make a ball move down on the click of a button, make a bouncing ball, and make a ball animate as per the specified curve.
⦁ Chapter 12, Using Google Maps, showcases how to use the Google API to display location and other information. You will learn to derive the distance between two locations and display location on Google Maps on the basis of longitude and latitude values that are entered.
⦁ Chapter 13, Running Python Scripts on Android and iOS devices, takes you through how to use QPython to run Python scripts on Android devices. You will learn how to package Kivy Python scripts on Android and iOS devices. You will be making several applications for mobile devices, such as prompting for the user’s name and displaying a welcome message, understanding different buttons in a Dialog box, performing single and multiple selections from a list, selecting date using a Date Picker dialog, capturing images using a camera, making Android devices speak text, creating cross-platform Python scripts using Kivy, packaging Python scripts into the Android APK using Buildozer, and packaging Python scripts for iOS.